File tree 2 files changed +2
-6
lines changed
packages/editor/src/ui/BottomToolbar 2 files changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ import {
10
10
import Drawer from '@material-ui/core/Drawer' ;
11
11
import FormatSize from '@material-ui/icons/FormatSize' ;
12
12
import React from 'react' ;
13
+ import { useCellPlugin } from '../../core/components/hooks' ;
13
14
import ThemeProvider , { darkTheme } from '../ThemeProvider' ;
14
15
import Tools from './Tools' ;
15
16
import { BottomToolbarProps } from './types' ;
@@ -27,10 +28,9 @@ const BottomToolbar: React.FC<BottomToolbarProps> = ({
27
28
theme,
28
29
anchor = 'bottom' ,
29
30
30
- title,
31
- icon = null ,
32
31
nodeId,
33
32
} ) => {
33
+ const { title, icon } = useCellPlugin ( nodeId ) ?? { } ;
34
34
const [ size , setSize ] = React . useState ( lastSize ) ;
35
35
const toggleSize = ( ) => {
36
36
const newSize = SIZES [ ( SIZES . indexOf ( size ) + 1 ) % SIZES . length ] ;
Original file line number Diff line number Diff line change @@ -4,12 +4,8 @@ export type BottomToolbarProps = {
4
4
children ?: React . ReactNode ;
5
5
className ?: string ;
6
6
dark : boolean ;
7
- title ?: string ;
8
7
anchor ?: 'top' | 'bottom' | 'left' | 'right' ;
9
8
10
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
11
- icon ?: any ;
12
-
13
9
// eslint-disable-next-line @typescript-eslint/no-explicit-any
14
10
theme ?: any ;
15
11
} & ToolsProps ;
You can’t perform that action at this time.
0 commit comments