From a1bdbde14429784e71dee2738ac4e6c834fa7aa4 Mon Sep 17 00:00:00 2001 From: "tema.buran" Date: Sat, 14 Mar 2026 09:14:41 +0300 Subject: [PATCH] feat(docs): replaced the hardcoded icons in the paragraph settings --- packages/docs-ui/src/views/paragraph-setting/Setting.tsx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/docs-ui/src/views/paragraph-setting/Setting.tsx b/packages/docs-ui/src/views/paragraph-setting/Setting.tsx index 6dcaf3cc7e39..822a4aff7db1 100644 --- a/packages/docs-ui/src/views/paragraph-setting/Setting.tsx +++ b/packages/docs-ui/src/views/paragraph-setting/Setting.tsx @@ -16,8 +16,7 @@ import { HorizontalAlign, LocaleService, SpacingRule } from '@univerjs/core'; import { borderClassName, clsx, InputNumber, Select, Tooltip } from '@univerjs/design'; -import { AlignTextBothIcon, HorizontallyIcon, LeftJustifyingIcon, RightJustifyingIcon } from '@univerjs/icons'; -import { useDependency } from '@univerjs/ui'; +import { ComponentManager, useDependency } from '@univerjs/ui'; import { useMemo, useRef } from 'react'; import { useCurrentParagraph, @@ -64,6 +63,12 @@ const AutoFocusInputNumber = (props: { }; export function ParagraphSetting() { const localeService = useDependency(LocaleService); + const componentManager = useDependency(ComponentManager); + + const LeftJustifyingIcon = componentManager.get('LeftJustifyingIcon'); + const HorizontallyIcon = componentManager.get('HorizontallyIcon'); + const RightJustifyingIcon = componentManager.get('RightJustifyingIcon'); + const AlignTextBothIcon = componentManager.get('AlignTextBothIcon'); const alignmentOptions = useMemo(() => [ { label: localeService.t('toolbar.alignLeft'), value: String(HorizontalAlign.LEFT), icon: },