From a4ed2bfbdab0b2c224656c1d4d6c1f8e0d19ecc5 Mon Sep 17 00:00:00 2001 From: Felix Feng Date: Wed, 25 Dec 2024 20:38:14 +0800 Subject: [PATCH] fix --- .../default/plate-ui/indent-list-toolbar-button.tsx | 6 ++++-- apps/www/src/registry/default/plate-ui/toolbar.tsx | 8 ++------ 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/apps/www/src/registry/default/plate-ui/indent-list-toolbar-button.tsx b/apps/www/src/registry/default/plate-ui/indent-list-toolbar-button.tsx index cccc0c52d3..c1d809ac33 100644 --- a/apps/www/src/registry/default/plate-ui/indent-list-toolbar-button.tsx +++ b/apps/www/src/registry/default/plate-ui/indent-list-toolbar-button.tsx @@ -43,12 +43,13 @@ export function NumberedIndentListToolbarButton() { return ( { toggleIndentList(editor, { listStyleType: ListStyleType.Decimal, }); }} - pressed={pressed} + data-state={pressed ? 'on' : 'off'} > @@ -129,12 +130,13 @@ export function BulletedIndentListToolbarButton() { return ( { toggleIndentList(editor, { listStyleType: ListStyleType.Disc, }); }} - pressed={pressed} + data-state={pressed ? 'on' : 'off'} > diff --git a/apps/www/src/registry/default/plate-ui/toolbar.tsx b/apps/www/src/registry/default/plate-ui/toolbar.tsx index 79a199acbc..1d27f55edd 100644 --- a/apps/www/src/registry/default/plate-ui/toolbar.tsx +++ b/apps/www/src/registry/default/plate-ui/toolbar.tsx @@ -172,10 +172,8 @@ export const ToolbarSplitButton = React.forwardRef< export const ToolbarSplitButtonPrimary = React.forwardRef< React.ElementRef, - Omit, 'value'> & { - pressed?: boolean; - } ->(({ children, className, pressed, size, variant, ...props }, ref) => { + Omit, 'value'> +>(({ children, className, size, variant, ...props }, ref) => { return ( {children}