Skip to content

Commit 21a4bc9

Browse files
committed
Tailwind config customizations
1 parent c391846 commit 21a4bc9

File tree

3 files changed

+30
-22
lines changed

3 files changed

+30
-22
lines changed

src/App.js

+2-15
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,10 @@
1-
import logo from './logo.svg';
21
import './css/App.css';
2+
import AppHeader from './components/AppHeader';
33

44
function App() {
55
return (
66
<div className="App">
7-
<header className="App-header">
8-
<img src={logo} className="App-logo" alt="logo" />
9-
<p className="text-gray-400 font-semibold">
10-
Edit <code>src/App.js</code> and save to reload.
11-
</p>
12-
<a
13-
className="App-link"
14-
href="https://reactjs.org"
15-
target="_blank"
16-
rel="noopener noreferrer"
17-
>
18-
Learn React
19-
</a>
20-
</header>
7+
<AppHeader></AppHeader>
218
</div>
229
);
2310
}

src/index.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ import App from './App';
55
import reportWebVitals from './reportWebVitals';
66

77
ReactDOM.render(
8-
<React.StrictMode>
9-
<App />
10-
</React.StrictMode>,
11-
document.getElementById('root')
8+
<React.StrictMode>
9+
<App />
10+
</React.StrictMode>,
11+
document.getElementById('root')
1212
);
1313

1414
// If you want to start measuring performance in your app, pass a function

tailwind.config.js

+24-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,32 @@
1+
const colors = require('tailwindcss/colors');
2+
13
module.exports = {
24
purge: ['./src/**/*.{js,jsx,ts,tsx}', './public/index.html'],
3-
darkMode: false, // or 'media' or 'class'
5+
darkMode: 'class',
46
theme: {
5-
extend: {},
7+
extend: {
8+
colors: {
9+
'primary-light': '#F7F8FC',
10+
'secondary-light': '#FFFFFF',
11+
'ternary-light': '#f6f7f8',
12+
13+
'primary-dark': '#0D2438',
14+
'secondary-dark': '#102D44',
15+
'ternary-dark': '#1E3851',
16+
},
17+
container: {
18+
padding: {
19+
DEFAULT: '1rem',
20+
sm: '2rem',
21+
lg: '5rem',
22+
xl: '6rem',
23+
'2xl': '8rem',
24+
},
25+
},
26+
},
627
},
728
variants: {
8-
extend: {},
29+
extend: { opacity: ['disabled'] },
930
},
1031
plugins: [],
1132
};

0 commit comments

Comments
 (0)