Bug with styled types
See original GitHub issue- The issue is present in the latest release.
- I have searched the issues of this repository and believe that this is not a duplicate.
Steps to Reproduce 🕹
When we use Custom props for styled function when get the error:
interface StyledButtonProps {
type: string;
}
const StyledButton = styled(
({ type, ...other }: StyledButtonProps & ButtonProps) => <Button {...other} />
)({
color: props => (props.type === "test" ? "red" : "green"),
display: "block"
});
My sandbox https://codesandbox.io/s/hopeful-tesla-e9fut
Tech | Version |
---|---|
Material-UI | v4.9.2 |
React | 16.12.0 |
Browser | Chrome 80 |
TypeScript | 3.7.5 |
etc. |
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Bug with styled types · Issue #19668 · mui/material-ui
The issue is present in the latest release. I have searched the issues of this repository and believe that this is not a...
Read more >Take the Quiz - What Clutterbug are you?
Take the quiz and discover what style you are. ... Discover Other Types of Organizing Styles ... Sign up for the free Clutterbug®...
Read more >Bug (type) - Bulbapedia, the community-driven Pokémon ...
Bug -type moves are super-effective against Dark-, Grass-, and Psychic-type Pokémon, while Bug-type Pokémon are weak to Fire-, Flying-, and Rock-type moves.
Read more >Stinkbug | Features, Types, & Control
stinkbug, (family Pentatomidae), any of about 5,000 species of insects in the true bug order, Heteroptera, that are named for the foul-smelling secretions ......
Read more >Vw Beetle Classic Style Rear decklid Luggage Rack type ...
Deck Lid Rack Fits Type 1 Beetle Bug Sedan 1949-1967 Stainless Steel 15-2014 ... VW Classic Bug Beetle Roof Rack, Vintage Style Type...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Adding @eps1lon who is 100% more skilled in this area than me. (I suspect that this should be ∞, give or take, but I’m not a big proponent of percentages > 100! 😆)
@michelalbers Thanks a lot. Could you please add these examples to the documentation?