Created
September 12, 2023 09:47
-
-
Save HugeLetters/3e19c0fa6ec45380175436a255b73c80 to your computer and use it in GitHub Desktop.
How to compose CSS in web frameworks
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 Page() { | |
return ( | |
<div className="flex"> | |
<div>Page</div> | |
<Component /> | |
</div> | |
); | |
} | |
function Component() { | |
return <div className="items-center">component</div>; | |
} |
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 Page() { | |
return ( | |
<div className="flex"> | |
<div>Page</div> | |
<Component className="items-center" /> | |
</div> | |
); | |
} | |
function Component({ className }: { className: string }) { | |
return <div className={className}>component</div>; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment