Skip to content

Commit

Permalink
Added tailwind style
Browse files Browse the repository at this point in the history
  • Loading branch information
dconco committed Nov 27, 2023
1 parent 1a3d03c commit 1876bf7
Show file tree
Hide file tree
Showing 9 changed files with 69 additions and 4 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/webpack.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: NodeJS with Webpack

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [14.x, 16.x, 18.x]

steps:
- uses: actions/checkout@v3

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}

- name: Build
run: |
npm install
npx webpack
23 changes: 23 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# production
/build

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
2 changes: 1 addition & 1 deletion src/App.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
button {
cursor: pointer;
color: #fff;
color: #fff !important;
font-weight: bold;
display: flex;
justify-content: center;
Expand Down
2 changes: 1 addition & 1 deletion src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function App({ name }) {
return (
<div>
<div style={styles.div}>
<h1 style={styles.h1}>Hello {name}, Welcome to React Router Modal Site</h1>
<h1 style={styles.h1} className='text-3xl font-bold underline'>Hello {name}, Welcome to React Router Modal Site</h1>
<br />
<h2 style={{ color: 'wheat' }}>Nice website</h2>
</div>
Expand Down
1 change: 0 additions & 1 deletion src/Router.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import RouterModalProvider, { SwitchRoutes, RouteModal, routerFade, routerSlideL
import App from './App'
import Login from './pages/Login'


// Render routes to Page
const Router = () => {
return (
Expand Down
3 changes: 3 additions & 0 deletions src/components/styles/tailwind.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@tailwind base;
@tailwind components;
@tailwind utilities;
2 changes: 2 additions & 0 deletions src/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ import React from 'react'
import { createRoot } from 'react-dom/client'
import Router from './Router'
import reportWebVitals from './reportWebVitals';

import './index.css'
import './components/styles/tailwind.css'

const Root = createRoot(document.getElementById('root'))
Root.render(
Expand Down
2 changes: 1 addition & 1 deletion src/pages/Login.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function Login() {
return (
<div>
<div style={styles.div}>
<h1 style={styles.h1}>Welcome Back!</h1>
<h1 style={styles.h1} className='text-2xl font-bold underline'>Welcome Back!</h1>
</div>

<br />
Expand Down
10 changes: 10 additions & 0 deletions tailwind.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/** @type {import('tailwindcss').Config} */
module.exports = {
content: [
"./src/**/*.{js,jsx,ts,tsx}"
],
theme: {
extend: {},
},
plugins: [],
}

0 comments on commit 1876bf7

Please sign in to comment.