Skip to content

The open alternative to Salesforce, designed for AI.

962 B
Raw Blame
import { type ComponentProps } from 'react';
import { type KeysOfUnion } from 'type-fest';

import { type SegmentedControl } from '../src/components/input/SegmentedControl/SegmentedControl';

export const SEGMENTED_CONTROL_PROP_DESCRIPTIONS = {
  fullWidth: 'Stretch the control to the width of its container.',
  itemWidth: 'Use equal-width options or size each option to its content.',
  options:
    'Options with a unique string `value`, a `label` or `startIcon`, and optional `disabled`. Icon-only options require an `aria-label`.',
  size: 'Control height: `sm` (24px) or `md` (32px).',
  variant:
    'Shape: `round` is a pill, `rectangle` fills its container with form-field corners.',
  'aria-label': 'Accessible group name. Supply this or `aria-labelledby`.',
  'aria-labelledby':
    'ID of an element that labels the group. Supply this or `aria-label`.',
} satisfies Partial<
  Record<KeysOfUnion<ComponentProps<typeof SegmentedControl>>, string>
>;