| 157 | export const useToolbarContext = () => React.useContext(ToolbarContext) |
| 158 | |
| 159 | export 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 | } |
nothing calls this directly
no test coverage detected
searching dependent graphs…