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

Function ColorSpaceControl

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

getColorChannelsFunction · 0.90

Tested by

no test coverage detected