Browser.tsx 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. import { uiDemoUrl } from '@/config/site';
  2. import Icon from '@/components/Icon';
  3. import ResponsiveImage from '@/components/ResponsiveImage';
  4. import clsx from 'clsx';
  5. export default function Browser({ icon = 'lock', url = uiDemoUrl, noresize = false, className, children, ...props }:{
  6. icon?: string,
  7. url?: string,
  8. noresize?: boolean,
  9. className?: string,
  10. children?: React.ReactNode
  11. }) {
  12. return (
  13. <div className={clsx('browser', noresize && 'browser-noresize', className)} {...props}>
  14. <div className="browser-header">
  15. <div className="row items-center">
  16. <div className="col-auto md:col-2">
  17. <div className="browser-dots">
  18. <div className="browser-dot" />
  19. <div className="browser-dot" />
  20. <div className="browser-dot" />
  21. </div>
  22. </div>
  23. <div className="col-8">
  24. <div className="tooltip" data-title="Open preview of Tabler dashboard!">
  25. <a href={url} className="browser-input" target="_blank" rel="noopener noreferrer">
  26. <Icon name={icon} />
  27. {url}
  28. </a>
  29. </div>
  30. </div>
  31. </div>
  32. </div>
  33. <div className="browser-image">{children}</div>
  34. </div>
  35. );
  36. }