Summary
Text declares a size?: TextSize prop, documented as an explicit font-size override:
/**
* Explicit font size override. When set, overrides the size from `type`
* ...
* ⚠️ Lint rule: Prefer using `type` alone. Use `size` only for custom
* UI elements that need explicit size control (metrics, callouts).
*/
size?: TextSize;
But the implementation destructures it away and never applies it:
export function Text({
type = 'body',
size: _size, // <-- discarded; never referenced again
color,
...
Rendered font size comes exclusively from type — no size class, style, or data attribute is emitted (themeProps('text', {type, color}) doesn't include it either).
Repro
<Text type="code" size="2xs">should be tiny</Text>
<Text type="code">same size as the line above</Text>
Both render at --text-code-size. Version: @astryxdesign/core 0.1.2.
Expected
Either of:
size actually overrides the type's font size, per its JSDoc; or
- the prop is removed (or
@deprecated + lint-flagged) so TypeScript surfaces the mistake.
Why it matters
The silent no-op is the worst of both: it type-checks, it's documented as working, and codebases accumulate dead size= props while everyone tunes their UI around what happens to render. We found dozens of no-op usages in our app once we noticed.
Summary
Textdeclares asize?: TextSizeprop, documented as an explicit font-size override:But the implementation destructures it away and never applies it:
Rendered font size comes exclusively from
type— no size class, style, or data attribute is emitted (themeProps('text', {type, color})doesn't include it either).Repro
Both render at
--text-code-size. Version:@astryxdesign/core0.1.2.Expected
Either of:
sizeactually overrides the type's font size, per its JSDoc; or@deprecated+ lint-flagged) so TypeScript surfaces the mistake.Why it matters
The silent no-op is the worst of both: it type-checks, it's documented as working, and codebases accumulate dead
size=props while everyone tunes their UI around what happens to render. We found dozens of no-op usages in our app once we noticed.