Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
chelentos opened this issue May 14, 2024 · 3 comments
Closed

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

chelentos opened this issue May 14, 2024 · 3 comments
Labels
component: Text enhancement New feature or request

Comments

@chelentos
Copy link
Contributor

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 korvin89 added the enhancement New feature or request label May 14, 2024
@korvin89
Copy link
Contributor

сс @IsaevAlexandr

@chelentos
Copy link
Contributor Author

Resolved here

@baikinkirill
Copy link

Hi! We are using version uikit 6.23.0 and components 3.7.0. We still have an error when using the "as" prop in the Text component:

export const Text: <C="span" extends any>({ref, ...props}: (TextProps<C> & Omit<React.PropsWithoutRef<React.ComponentProps<C>>, keyof TextProps<T>> & {ref?: TextRef<C> | undefined})) => React.ReactElement

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: Text enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants