Skip to content

Commit 2aedeb9

Browse files
committed
fix: missing title and icon in bottom toolbar
1 parent a903ac0 commit 2aedeb9

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

packages/editor/src/ui/BottomToolbar/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import {
1010
import Drawer from '@material-ui/core/Drawer';
1111
import FormatSize from '@material-ui/icons/FormatSize';
1212
import React from 'react';
13+
import { useCellPlugin } from '../../core/components/hooks';
1314
import ThemeProvider, { darkTheme } from '../ThemeProvider';
1415
import Tools from './Tools';
1516
import { BottomToolbarProps } from './types';
@@ -27,10 +28,9 @@ const BottomToolbar: React.FC<BottomToolbarProps> = ({
2728
theme,
2829
anchor = 'bottom',
2930

30-
title,
31-
icon = null,
3231
nodeId,
3332
}) => {
33+
const { title, icon } = useCellPlugin(nodeId) ?? {};
3434
const [size, setSize] = React.useState(lastSize);
3535
const toggleSize = () => {
3636
const newSize = SIZES[(SIZES.indexOf(size) + 1) % SIZES.length];

packages/editor/src/ui/BottomToolbar/types.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,8 @@ export type BottomToolbarProps = {
44
children?: React.ReactNode;
55
className?: string;
66
dark: boolean;
7-
title?: string;
87
anchor?: 'top' | 'bottom' | 'left' | 'right';
98

10-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
11-
icon?: any;
12-
139
// eslint-disable-next-line @typescript-eslint/no-explicit-any
1410
theme?: any;
1511
} & ToolsProps;

0 commit comments

Comments
 (0)