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
Missing "as" props on @zendeskgarden/react-typography titles #886
Comments
Looks like we need to include some additional type extensions for the majority of the components that spread props. You might be able to get this working locally by following a similar approach to the Could you give this a shot? declare module 'react' {
interface DOMAttributes<T> {
as?: string;
}
} |
Looking into this more, it looks like They have a private type
We would have to manually include |
I could be wrong, but don't we recommend using the |
Good point, the |
Having two different props ( |
Some background on @jzempel after some more thought I'm not sure if we should document this further for the non-typography elements. It makes sense for the typography use-case, but could lead to a11y issues for other components if consumers started to tweak them. If we were using native-focus for |
The decision is to leave this as-is. Use |
Expectations
We should be able to change the used HTML tag with the
as
props. This is a native Styled Component features.This code works in JS (the used tag is h1 instead of div) but with TS the validation failed.
Reality
Fine Print
v8.0.0
The text was updated successfully, but these errors were encountered: