_well.js 898 B

12345678910111213141516171819202122232425
  1. import { View } from 'app/design/view'
  2. import { appSetting, cn } from 'app/lib/util'
  3. const inputSettings = appSetting('theme', 'inputs')
  4. /**
  5. * Input-height surface for fields made of buttons instead of a text box
  6. * (labels, selector, visibility, attachments). Same fill, outline, radius and
  7. * height as text inputs; `p-1` fits `small` (36px) buttons from
  8. * `wellButtonProps` into the 44px well with a 4px inset.
  9. */
  10. export default function FieldWell({ className, children }) {
  11. return (
  12. <View
  13. className={cn(
  14. 'w-full flex-row flex-wrap items-center gap-1 p-1 bg-input/50 shadow-input-outline dark:shadow-input-outline-deep',
  15. inputSettings.rounded?.default ?? 'rounded-xl',
  16. inputSettings.surface_size?.regular ?? 'min-h-11',
  17. className
  18. )}
  19. >
  20. {children}
  21. </View>
  22. )
  23. }