MCPcopy Create free account
hub / github.com/adobe/react-spectrum / ListFormatControl

Function ListFormatControl

packages/dev/s2-docs/src/VisualExampleClient.tsx:1067–1080  ·  view source on GitHub ↗
({control, value, onChange}: ControlProps)

Source from the content-addressed store, hash-verified

1065}
1066
1067function ListFormatControl({control, value, onChange}: ControlProps) {
1068 return (
1069 <Picker
1070 label={control.name}
1071 contextualHelp={<PropContextualHelp control={control} />}
1072 value={value?.type ?? 'conjunction'}
1073 onChange={type => onChange({...value, type})}
1074 styles={style({width: controlWidth})}>
1075 <PickerItem id="conjunction">Conjunction</PickerItem>
1076 <PickerItem id="disjunction">Disjunction</PickerItem>
1077 <PickerItem id="unit">Unit</PickerItem>
1078 </Picker>
1079 );
1080}
1081
1082function DateTimeFormatControl({control, value, onChange}: ControlProps) {
1083 let clear = (v: any) => (v === 'short' ? undefined : v);

Callers

nothing calls this directly

Calls 1

onChangeFunction · 0.70

Tested by

no test coverage detected