From 3f34a72b661782b9e2f35b5182d86a4b00f15445 Mon Sep 17 00:00:00 2001 From: creatixchu Date: Mon, 3 Aug 2026 10:42:34 +0800 Subject: [PATCH] review(ui-primitives): stop the size doc from enumerating native sizes The parenthetical listed 14/16 and this branch added 20, but the set never held to it: IconRightUpOutline14 defaults to 8, IconTreeCorner8x10 to 10, and IconWarningOutline16 to 14. Drop the list rather than maintain one that drifts, and retitle the icons test that carried the same generalization. --- packages/client/ui-primitives/src/icons/props.ts | 2 +- packages/client/ui-primitives/tests/icons.spec.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/client/ui-primitives/src/icons/props.ts b/packages/client/ui-primitives/src/icons/props.ts index d86245b550..27dde23e4d 100644 --- a/packages/client/ui-primitives/src/icons/props.ts +++ b/packages/client/ui-primitives/src/icons/props.ts @@ -1,6 +1,6 @@ /** Shared props for every ic_ds_* icon component. */ export interface IconProps { - /** Square edge in px; defaults to the glyph's native size (14, 16, or 20). */ + /** Square edge in px; defaults to the glyph's own drawn size. */ size?: number | undefined /** Extra class for layout placement; color rides currentColor. * (`| undefined` for exactOptionalPropertyTypes: callers forward their own optional prop.) */ diff --git a/packages/client/ui-primitives/tests/icons.spec.tsx b/packages/client/ui-primitives/tests/icons.spec.tsx index fbc4b71e28..cc5175cba4 100644 --- a/packages/client/ui-primitives/tests/icons.spec.tsx +++ b/packages/client/ui-primitives/tests/icons.spec.tsx @@ -36,7 +36,7 @@ describe('ic_ds_ icon set', () => { expect(svg.classList.contains('x')).toBe(true) }) - it('native defaults: 14-glyphs default 14, 16-glyphs default 16, 20-glyphs default 20', () => { + it('each glyph defaults to its own drawn size, not one set-wide default', () => { const api = render() expect(api.container.querySelector('svg')!.getAttribute('width')).toBe('14') const folder = render()