DocsButton.tsx 540 B

123456789101112131415161718192021222324
  1. import { BookOpen } from 'lucide-react'
  2. import { Button } from 'ui'
  3. interface DocsButtonProps {
  4. href: string
  5. abbrev?: boolean
  6. className?: string
  7. }
  8. export const DocsButton = ({ href, abbrev = true, className }: DocsButtonProps) => {
  9. return (
  10. <Button
  11. asChild
  12. type="default"
  13. className={className}
  14. icon={<BookOpen />}
  15. onClick={(e) => e.stopPropagation()}
  16. >
  17. <a target="_blank" rel="noopener noreferrer" href={href}>
  18. {abbrev ? 'Docs' : 'Documentation'}
  19. </a>
  20. </Button>
  21. )
  22. }