AI store generator for ecommerce, Malaysia first. Laravel 13 + React + TypeScript.
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

123456789101112131415161718192021222324
  1. import { Link } from '@inertiajs/react';
  2. import type { InertiaLinkProps } from '@inertiajs/react';
  3. import { ArrowLeft } from 'lucide-react';
  4. import { Button } from '@/components/ui/button';
  5. /**
  6. * The "← Back to …" button at the top of a page. Outlined, so it is easy to see.
  7. */
  8. export function BackButton({
  9. href,
  10. children,
  11. }: {
  12. href: InertiaLinkProps['href'];
  13. children: React.ReactNode;
  14. }) {
  15. return (
  16. <Button variant="outline" size="sm" className="-ml-0.5" asChild>
  17. <Link href={href} data-test="back-button">
  18. <ArrowLeft />
  19. {children}
  20. </Link>
  21. </Button>
  22. );
  23. }