1
0

EditButton.tsx 456 B

12345678910111213
  1. import Button from './Button'
  2. import type { ButtonProps } from './Button'
  3. import { PencilSquareIcon } from '@heroicons/react/20/solid'
  4. import type { PropsWithChildren } from 'react'
  5. export default function EditButton({ className = '', ...props }: PropsWithChildren<ButtonProps>) {
  6. return (
  7. <Button className={`edit ${className}`} {...props}>
  8. <PencilSquareIcon />
  9. {props.children ? props.children : <span>Edit</span>}
  10. </Button>
  11. )
  12. }