You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using a function, I'm not sure there is a way to figure out automatically what is the type of theme
(you might have not initialized the theme in the first place).
Ideally the type should be inferred when providing it as a generic type.
Activity
specialdoom commentedon Nov 30, 2022
Anything on this?
mlaopane commentedon Dec 29, 2022
When using a function, I'm not sure there is a way to figure out automatically what is the type of
theme(you might have not initialized the theme in the first place).
Ideally the type should be inferred when providing it as a generic type.
PS : Please do not provide only screenshots when opening an issue 🙏🏽
thegurneet commentedon Jan 12, 2023
The screenshot in this instance provided enough information.
`const SomeText = styled("div")<{ theme: typeof myTheme }>``
Defining the theme like this is wrong. For each no styled component I will have to define the theme as typeof myTheme.
The documentation solid-styled-components is based of: https://styled-components.com/docs/advanced
The theme is always defined by default, we simply extend onto it by giving it more props.
fix(types): theme optional removed (solidjs#42)