gravity-ui / uikit

https://gravity-ui.com
MIT License
520 stars 84 forks source link

HTML-tag props are not inherited in Text component #1581

Closed chelentos closed 1 month ago

chelentos commented 1 month ago

For example I want to write something like this:

<Text as="label" htmlFor="someId">label text</Text>

But i'm getting ts error about not existing prop.

Error example Property 'htmlFor' does not exist on type 'IntrinsicAttributes & { as?: "label" | undefined; } & Omit & { ref?: ((instance: HTMLLabelElement | null) => void) | RefObject | null | undefined; }'
korvin89 commented 1 month ago

сс @IsaevAlexandr

chelentos commented 1 month ago

Resolved here