question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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:closed
  • Created 4 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
mbrookescommented, Feb 21, 2020

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! 😆)

1reaction
kodermaxcommented, Feb 12, 2020

@michelalbers Thanks a lot. Could you please add these examples to the documentation?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found