Created
September 17, 2020 23:41
-
-
Save xandout/b1991394b06669ce92257913a3c8cc7a to your computer and use it in GitHub Desktop.
Tailwind CSS v1.0 Color Palette
This file contains hidden or 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
<div id="app"></div> |
This file contains hidden or 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
const colors =['gray','red','orange','yellow','green','teal','blue','indigo','purple','pink'] | |
const ColorRow = function ({color}) { | |
return ( | |
<div class="flex flex-wrap"> | |
{ | |
[100, 200, 300, 400, 500, 600, 700, 800, 900].reverse().map(shade => ( | |
<div class={`h-12 w-12 bg-${color}-${shade}`}></div> | |
)) | |
} | |
</div> | |
) | |
} | |
ReactDOM.render( | |
<div class="min-h-screen bg-white p-8 flex items-center justify-center"> | |
<div> | |
{ colors.map(color => <ColorRow color={color}/>) } | |
</div> | |
</div>, | |
document.getElementById('app') | |
); |
This file contains hidden or 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
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/16.8.4/umd/react.production.min.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/react-dom/16.8.4/umd/react-dom.production.min.js"></script> |
This file contains hidden or 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
<link href="https://cdnjs.cloudflare.com/ajax/libs/tailwindcss/1.8.10/tailwind.min.css" rel="stylesheet" /> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment