Last active
October 30, 2023 11:47
-
-
Save LauraBeatris/294545869fc6c5b240c3d8fcc4c81c9e to your computer and use it in GitHub Desktop.
Helper TS function to provide props for a Styled Component
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
function styledComponentWithProps<T, U extends HTMLElement = HTMLElement> | |
(styledFunction: StyledFunction<React.HTMLProps<U>>): StyledFunction<T & React.HTMLProps<U>> { | |
return styledFunction | |
} |
Author
LauraBeatris
commented
Jul 25, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment