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

Function Toolbar

starters/docs/src/Toolbar.tsx:7–17  ·  view source on GitHub ↗
(props: ToolbarProps)

Source from the content-addressed store, hash-verified

5import './Toolbar.css';
6
7export function Toolbar(props: ToolbarProps) {
8 let {orientation = 'horizontal'} = props;
9 return (
10 <ToggleButtonGroupContext.Provider value={{orientation}}>
11 <SeparatorContext.Provider
12 value={{orientation: orientation === 'horizontal' ? 'vertical' : 'horizontal'}}>
13 <RACToolbar {...props} />
14 </SeparatorContext.Provider>
15 </ToggleButtonGroupContext.Provider>
16 );
17}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected