MCPcopy Create free account
hub / github.com/editablejs/editable / Toolbar

Function Toolbar

packages/ui/src/toolbar.tsx:159–170  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

157export const useToolbarContext = () => React.useContext(ToolbarContext)
158
159export const Toolbar: React.FC<Toolbar> = props => {
160 const { mode = 'normal' } = props
161 const side = props.side ?? mode === 'inline' ? 'top' : 'bottom'
162 return (
163 <ToolbarContext.Provider value={{ side, mode }}>
164 <StyledToolbar
165 {...props}
166 onClick={composeEventHandlers(props.onClick, e => e.preventDefault())}
167 />
168 </ToolbarContext.Provider>
169 )
170}

Callers

nothing calls this directly

Calls 1

composeEventHandlersFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…