button-setting.tsx 602 B

1234567891011121314151617181920212223242526272829303132
  1. import OLButton from '@/shared/components/ol/ol-button'
  2. import Setting from './setting'
  3. export default function ButtonSetting({
  4. id,
  5. label,
  6. buttonText,
  7. onClick,
  8. description,
  9. disabled,
  10. }: {
  11. id: string
  12. label: string
  13. buttonText: string
  14. onClick: () => void
  15. description?: string
  16. disabled?: boolean
  17. }) {
  18. return (
  19. <Setting controlId={id} label={label} description={description}>
  20. <OLButton
  21. id={id}
  22. variant="secondary"
  23. size="sm"
  24. onClick={onClick}
  25. disabled={disabled}
  26. >
  27. {buttonText}
  28. </OLButton>
  29. </Setting>
  30. )
  31. }