Skip to content

Commit 2bf9d81

Browse files
committed
Custom tailwind colors
1 parent 1fac51d commit 2bf9d81

File tree

5 files changed

+43
-13
lines changed

5 files changed

+43
-13
lines changed

package-lock.json

Lines changed: 21 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@
5555
"@fab/plugin-render-html": "1.0.0-rc.9",
5656
"@fab/plugin-rewire-assets": "1.0.0-rc.9",
5757
"@fab/server": "1.0.0-rc.9",
58+
"@tailwindcss/forms": "0.2.1",
59+
"@tailwindcss/line-clamp": "0.1.0",
5860
"@tailwindcss/postcss7-compat": "2.0.2",
5961
"@types/classnames": "2.2.11",
6062
"@types/react-router-dom": "5.1.7",

src/App.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ function App() {
55
return (
66
<Router>
77
<Switch>
8-
<Route path="/">
8+
<Route path="/" exact>
99
<Home />
1010
</Route>
1111
</Switch>

src/pages/Home.tsx

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export const Home: FC = () => {
99
return (
1010
<div style={{ minHeight: "712px" }} className="overflow-y-auto">
1111
<div className="min-h-screen bg-gray-100">
12-
<header className="pb-24 bg-indigo-600">
12+
<header className="pb-24 bg-gradient-to-r from-light-blue-800 to-cyan-600">
1313
<div className="max-w-3xl mx-auto px-4 sm:px-6 lg:max-w-7xl lg:px-8">
1414
<div className="relative py-5 flex items-center justify-center lg:justify-between">
1515
{/* Logo */}
@@ -18,7 +18,7 @@ export const Home: FC = () => {
1818
<span className="sr-only">Workflow</span>
1919
<img
2020
className="h-8 w-auto"
21-
src="https://tailwindui.com/img/logos/workflow-mark-indigo-300.svg"
21+
src="https://tailwindui.com/img/logos/workflow-mark-cyan-200.svg"
2222
alt="Workflow"
2323
/>
2424
</a>
@@ -28,7 +28,7 @@ export const Home: FC = () => {
2828
<div className="hidden lg:ml-4 lg:flex lg:items-center lg:pr-0.5">
2929
<button
3030
type="button"
31-
className="flex-shrink-0 p-1 text-indigo-200 rounded-full hover:text-white hover:bg-white hover:bg-opacity-10 focus:outline-none focus:ring-2 focus:ring-white"
31+
className="flex-shrink-0 p-1 text-cyan-200 rounded-full hover:text-white hover:bg-white hover:bg-opacity-10 focus:outline-none focus:ring-2 focus:ring-white"
3232
>
3333
<span className="sr-only">View notifications</span>
3434
<svg
@@ -161,7 +161,7 @@ export const Home: FC = () => {
161161
{/* Mobile menu button */}
162162
<button
163163
onClick={() => setIsOpen(!isOpen)}
164-
className="bg-transparent p-2 rounded-md inline-flex items-center justify-center text-indigo-200 hover:text-white hover:bg-white hover:bg-opacity-10 focus:outline-none focus:ring-2 focus:ring-white"
164+
className="bg-transparent p-2 rounded-md inline-flex items-center justify-center text-cyan-200 hover:text-white hover:bg-white hover:bg-opacity-10 focus:outline-none focus:ring-2 focus:ring-white"
165165
aria-expanded={isOpen}
166166
>
167167
<span className="sr-only">Open main menu</span>
@@ -218,31 +218,31 @@ export const Home: FC = () => {
218218

219219
<a
220220
href="/"
221-
className="text-indigo-100 text-sm font-medium rounded-md bg-white bg-opacity-0 px-3 py-2 hover:bg-opacity-10"
221+
className="text-cyan-100 text-sm font-medium rounded-md bg-white bg-opacity-0 px-3 py-2 hover:bg-opacity-10"
222222
aria-current="false"
223223
>
224224
Profile
225225
</a>
226226

227227
<a
228228
href="/"
229-
className="text-indigo-100 text-sm font-medium rounded-md bg-white bg-opacity-0 px-3 py-2 hover:bg-opacity-10"
229+
className="text-cyan-100 text-sm font-medium rounded-md bg-white bg-opacity-0 px-3 py-2 hover:bg-opacity-10"
230230
aria-current="false"
231231
>
232232
Resources
233233
</a>
234234

235235
<a
236236
href="/"
237-
className="text-indigo-100 text-sm font-medium rounded-md bg-white bg-opacity-0 px-3 py-2 hover:bg-opacity-10"
237+
className="text-cyan-100 text-sm font-medium rounded-md bg-white bg-opacity-0 px-3 py-2 hover:bg-opacity-10"
238238
aria-current="false"
239239
>
240240
Company Directory
241241
</a>
242242

243243
<a
244244
href="/"
245-
className="text-indigo-100 text-sm font-medium rounded-md bg-white bg-opacity-0 px-3 py-2 hover:bg-opacity-10"
245+
className="text-cyan-100 text-sm font-medium rounded-md bg-white bg-opacity-0 px-3 py-2 hover:bg-opacity-10"
246246
aria-current="false"
247247
>
248248
Openings
@@ -312,15 +312,15 @@ export const Home: FC = () => {
312312
<div>
313313
<img
314314
className="h-8 w-auto"
315-
src="https://tailwindui.com/img/logos/workflow-mark-indigo-600.svg"
315+
src="https://tailwindui.com/img/logos/workflow-mark-cyan-600.svg"
316316
alt="Workflow"
317317
/>
318318
</div>
319319
<div className="-mr-2">
320320
<button
321321
onClick={() => setIsOpen(false)}
322322
type="button"
323-
className="bg-white rounded-md p-2 inline-flex items-center justify-center text-gray-400 hover:text-gray-500 hover:bg-gray-100 focus:outline-none focus:ring-2 focus:ring-inset focus:ring-indigo-500"
323+
className="bg-white rounded-md p-2 inline-flex items-center justify-center text-gray-400 hover:text-gray-500 hover:bg-gray-100 focus:outline-none focus:ring-2 focus:ring-inset focus:ring-cyan-500"
324324
>
325325
<span className="sr-only">Close menu</span>
326326
<svg
@@ -391,7 +391,7 @@ export const Home: FC = () => {
391391
392392
</div>
393393
</div>
394-
<button className="ml-auto flex-shrink-0 bg-white p-1 text-gray-400 rounded-full hover:text-gray-500 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500">
394+
<button className="ml-auto flex-shrink-0 bg-white p-1 text-gray-400 rounded-full hover:text-gray-500 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-cyan-500">
395395
<span className="sr-only">View notifications</span>
396396
<svg
397397
className="h-6 w-6"

tailwind.config.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,17 @@
11
const defaultTheme = require("tailwindcss/defaultTheme");
2+
const colors = require("tailwindcss/colors");
23

34
module.exports = {
45
purge: ["./src/**/*.{js,jsx,ts,tsx,css}", "./public/index.html"],
56
darkMode: "media",
67
theme: {
78
extend: {
9+
colors: {
10+
"light-blue": colors.lightBlue,
11+
teal: colors.teal,
12+
cyan: colors.cyan,
13+
rose: colors.rose,
14+
},
815
fontFamily: {
916
sans: ["Inter var", ...defaultTheme.fontFamily.sans],
1017
},
@@ -13,5 +20,5 @@ module.exports = {
1320
variants: {
1421
extend: {},
1522
},
16-
plugins: [],
23+
plugins: [require("@tailwindcss/forms"), require("@tailwindcss/line-clamp")],
1724
};

0 commit comments

Comments
 (0)