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

Function ListFormatControl

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

onChangeFunction · 0.70

Tested by

no test coverage detected