back-button.tsx 855 B

12345678910111213141516171819202122232425262728293031323334
  1. import MaterialIcon from '@/shared/components/material-icon'
  2. import IconButton from '@/features/ui/components/bootstrap-5/icon-button'
  3. import BootstrapVersionSwitcher from '@/features/ui/components/bootstrap-5/bootstrap-version-switcher'
  4. type BackButtonProps = {
  5. href: string
  6. accessibilityLabel: string
  7. }
  8. function BackButton({ href, accessibilityLabel }: BackButtonProps) {
  9. return (
  10. <BootstrapVersionSwitcher
  11. bs3={
  12. <a href={href} className="back-btn">
  13. <MaterialIcon
  14. type="arrow_back"
  15. accessibilityLabel={accessibilityLabel}
  16. />
  17. </a>
  18. }
  19. bs5={
  20. <IconButton
  21. variant="ghost"
  22. href={href}
  23. size="lg"
  24. icon="arrow_back"
  25. accessibilityLabel={accessibilityLabel}
  26. />
  27. }
  28. />
  29. )
  30. }
  31. export default BackButton