Build your own AI office with Univer Office SDK. Bring editing, calculation, collaboration, and file processing into your product for people and AI agents. Built on an extensible open-source core.
TypeScript boardcollaborationdocdocxexceloffce365officepdfpptpptxpresentationsdksheetslidesspreadsheetuniverwordwordprocessorworkspacexlsx
fix(ui): respect ribbon button size overrides (#7681)
白熱d555e1297ae2
diff --git a/packages/ui/src/views/components/ribbon/ToolbarButton.tsx b/packages/ui/src/views/components/ribbon/ToolbarButton.tsxindex dc337c1579..2d8469db2a 100644--- a/packages/ui/src/views/components/ribbon/ToolbarButton.tsx+++ b/packages/ui/src/views/components/ribbon/ToolbarButton.tsx@@ -14,7 +14,7 @@* limitations under the License.*/-import { cva } from '@univerjs/design';+import { clsx, cva } from '@univerjs/design';export interface IBaseToolbarButtonProps {children?: React.ReactNode;@@ -115,7 +115,7 @@ export function ToolbarButton(props: IBaseToolbarButtonProps) {return (<buttontype="button"- className={toolbarButtonVariants({ noIcon, active, className })}+ className={clsx(toolbarButtonVariants({ noIcon, active, className }))}style={style}disabled={disabled}onClick={handleClick}diff --git a/packages/ui/src/views/components/ribbon/ToolbarItem.tsx b/packages/ui/src/views/components/ribbon/ToolbarItem.tsxindex 8d7d051d5c..a9d077c060 100644--- a/packages/ui/src/views/components/ribbon/ToolbarItem.tsx+++ b/packages/ui/src/views/components/ribbon/ToolbarItem.tsx@@ -453,7 +453,7 @@ export const ToolbarItem = forwardRef<ITooltipWrapperRef, IToolbarItemProps>((prreturn (<spandata-u-command={id}- className={toolbarButtonVariants({+ className={clsx(toolbarButtonVariants({noIcon: !icon,active: activated,className: clsx(buttonClassName, !hoverable && `@@ -461,7 +461,7 @@ export const ToolbarItem = forwardRef<ITooltipWrapperRef, IToolbarItemProps>((prhover:!univer-bg-transparentdark:hover:!univer-bg-transparent`),- })}+ }))}style={buttonStyle}aria-disabled={disabled}>