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

back-button.tsx 660B

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. }