forked from mui/material-ui
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Slider] Add sx prop in SliderStyled (mui#23205)
- Loading branch information
Showing
8 changed files
with
107 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,21 @@ | ||
import scStyled from 'styled-components'; | ||
|
||
export default function styled(tag, options) { | ||
let scStyledPrepared; | ||
|
||
if (options) { | ||
return scStyled(tag).withConfig({ | ||
scStyledPrepared = scStyled(tag).withConfig({ | ||
displayName: options.label, | ||
shouldForwardProp: options.shouldForwardProp, | ||
}); | ||
} else { | ||
scStyledPrepared = scStyled(tag); | ||
} | ||
|
||
return scStyled(tag); | ||
// TODO: This should not be required once we solve the warning `You have illegal escape sequence in your template literal` | ||
return (styles) => { | ||
return scStyledPrepared(...styles); | ||
}; | ||
} | ||
|
||
export { ThemeContext } from 'styled-components'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters