Skip to content

Commit

Permalink
add tailwind css
Browse files Browse the repository at this point in the history
  • Loading branch information
schabibi1 committed Aug 12, 2022
1 parent 154884a commit 1b023c0
Show file tree
Hide file tree
Showing 8 changed files with 709 additions and 66 deletions.
1 change: 1 addition & 0 deletions gatsby-browser.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import './src/styles/global.css'
1 change: 1 addition & 0 deletions gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ module.exports = {
siteUrl: `https://gatsbystarterdefaultsource.gatsbyjs.io/`,
},
plugins: [
`gatsby-plugin-postcss`,
`gatsby-plugin-react-helmet`,
`gatsby-plugin-image`,
{
Expand Down
739 changes: 678 additions & 61 deletions package-lock.json

Large diffs are not rendered by default.

8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,13 @@
"react-helmet": "^6.1.0"
},
"devDependencies": {
"autoprefixer": "^10.4.8",
"eslint": "^8.18.0",
"eslint-plugin-react": "^7.30.0",
"prettier": "2.5.1"
"gatsby-plugin-postcss": "^5.20.0",
"postcss": "^8.4.16",
"prettier": "2.5.1",
"tailwindcss": "^3.1.8"
},
"keywords": [
"gatsby"
Expand All @@ -45,4 +49,4 @@
"bugs": {
"url": "https://github.com/gatsbyjs/gatsby/issues"
}
}
}
6 changes: 6 additions & 0 deletions postcss.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
}
6 changes: 3 additions & 3 deletions src/components/teaser.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import { storyblokEditable } from "gatsby-source-storyblok";

const Teaser = ({ blok }) => {
return (
<div {...storyblokEditable(blok)}>
<h1>{blok.headline}</h1>
</div>
<h2 className="text-2xl mb-10" {...storyblokEditable(blok)}>
{blok.headline}
</h2>
)
}

Expand Down
3 changes: 3 additions & 0 deletions src/styles/global.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@tailwind base;
@tailwind components;
@tailwind utilities;
11 changes: 11 additions & 0 deletions tailwind.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/** @type {import('tailwindcss').Config} */
module.exports = {
content: [
"./src/pages/**/*.{js,jsx,ts,tsx}",
"./src/components/**/*.{js,jsx,ts,tsx}",
],
theme: {
extend: {},
},
plugins: [],
}

0 comments on commit 1b023c0

Please sign in to comment.