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(design): update background color for unchecked state in Switch component (#5796)
白熱47766b5a2689
diff --git a/packages/design/src/components/switch/Switch.tsx b/packages/design/src/components/switch/Switch.tsxindex 2ab04d232a..a9e77d84a7 100644--- a/packages/design/src/components/switch/Switch.tsx+++ b/packages/design/src/components/switch/Switch.tsx@@ -46,10 +46,11 @@ const Switch = (props: ISwitchProps) => {/><spanclassName={clsx(`- univer-absolute univer-inset-0 univer-cursor-pointer univer-rounded-2xl univer-bg-gray-50- univer-transition-colors univer-duration-200+ univer-absolute univer-inset-0 univer-cursor-pointer univer-rounded-2xl univer-transition-colors+ univer-duration-200`, {'univer-bg-primary-600': checked,+ 'univer-bg-gray-200 dark:!univer-bg-gray-600': !checked,})}><spandiff --git a/packages/sheets-ui/src/views/permission/permission-dialog/index.tsx b/packages/sheets-ui/src/views/permission/permission-dialog/index.tsxindex 3dcdf9b630..c7a7605c1a 100644--- a/packages/sheets-ui/src/views/permission/permission-dialog/index.tsx+++ b/packages/sheets-ui/src/views/permission/permission-dialog/index.tsx@@ -18,7 +18,7 @@ import type { Workbook } from '@univerjs/core';import type { ICollaborator, UnitAction } from '@univerjs/protocol';import { IAuthzIoService, ICommandService, IPermissionService, IUniverInstanceService, LocaleService, UniverInstanceType } from '@univerjs/core';-import { Button, Switch } from '@univerjs/design';+import { borderTopClassName, Button, clsx, Switch } from '@univerjs/design';import { ObjectScope, UnitObject, UnitRole } from '@univerjs/protocol';import { getAllWorksheetPermissionPoint, SetWorksheetPermissionPointsCommand, WorksheetProtectionPointModel } from '@univerjs/sheets';import { IDialogService, useDependency } from '@univerjs/ui';@@ -175,8 +175,7 @@ export const SheetPermissionDialog = () => {return (<Spin loading={loading}>- <div className="univer-flex univer-flex-col univer-p-2">- <div className="univer-h-px univer-bg-gray-200" />+ <div className={clsx('univer-flex univer-flex-col', borderTopClassName)}>{Object.keys(permissionMap).map((action) => {const actionItem = permissionMap[action];const { text, allowed } = actionItem;@@ -204,9 +203,12 @@ export const SheetPermissionDialog = () => {</div>);})}- <div className="univer-h-px univer-bg-gray-200" />- <div className="univer-mt-2 univer-flex univer-h-9 univer-items-center univer-justify-end univer-gap-2">+ <div+ className={clsx(`+ univer-flex univer-h-9 univer-items-center univer-justify-end univer-gap-2 univer-pt-2+ `, borderTopClassName)}+ ><ButtononClick={() => {dialogService.close(UNIVER_SHEET_PERMISSION_DIALOG_ID);