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

Function ListFormatControl

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

Source from the content-addressed store, hash-verified

1047}
1048
1049function ListFormatControl({control, value, onChange}: ControlProps) {
1050 return (
1051 <Picker
1052 label={control.name}
1053 contextualHelp={<PropContextualHelp control={control} />}
1054 value={value?.type ?? 'conjunction'}
1055 onChange={type => onChange({...value, type})}
1056 styles={style({width: controlWidth})}>
1057 <PickerItem id="conjunction">Conjunction</PickerItem>
1058 <PickerItem id="disjunction">Disjunction</PickerItem>
1059 <PickerItem id="unit">Unit</PickerItem>
1060 </Picker>
1061 );
1062}
1063
1064function DateTimeFormatControl({control, value, onChange}: ControlProps) {
1065 let clear = (v: any) => (v === 'short' ? undefined : v);

Callers

nothing calls this directly

Calls 1

onChangeFunction · 0.70

Tested by

no test coverage detected