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

Function ColorSpaceControl

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

Source from the content-addressed store, hash-verified

1418}
1419
1420function ColorSpaceControl({control, value}) {
1421 let {setProps} = useContext(Context);
1422 return (
1423 <UnionControl
1424 control={{
1425 ...control,
1426 optional: false
1427 }}
1428 value={value}
1429 onChange={colorSpace => {
1430 setProps(props => {
1431 props = {...props, colorSpace};
1432 if (props.channel) {
1433 props.channel = getColorChannels(colorSpace)[0];
1434 }
1435
1436 delete props.xChannel;
1437 delete props.yChannel;
1438 return props;
1439 });
1440 }}
1441 />
1442 );
1443}
1444
1445function PlacementControl({control, value, onChange}) {
1446 return (

Callers

nothing calls this directly

Calls 1

getColorChannelsFunction · 0.90

Tested by

no test coverage detected