setup tailwind and update cra

This commit is contained in:
rutik wankhade 2022-04-16 12:40:12 +05:30
parent 27e470152e
commit a424eb2fe3
11 changed files with 9614 additions and 8924 deletions

18451
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -9,7 +9,7 @@
"react": "^16.13.1", "react": "^16.13.1",
"react-component-export-image": "^0.1.6", "react-component-export-image": "^0.1.6",
"react-dom": "^16.13.1", "react-dom": "^16.13.1",
"react-scripts": "3.4.1", "react-scripts": "^5.0.1",
"react-select": "^3.1.0" "react-select": "^3.1.0"
}, },
"scripts": { "scripts": {
@ -32,5 +32,10 @@
"last 1 firefox version", "last 1 firefox version",
"last 1 safari version" "last 1 safari version"
] ]
},
"devDependencies": {
"autoprefixer": "^10.4.4",
"postcss": "^8.4.12",
"tailwindcss": "^3.0.24"
} }
} }

7
postcss.config.js Normal file
View File

@ -0,0 +1,7 @@
module.exports = {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
}

View File

@ -1,4 +1,4 @@
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@900&display=swap'); /* @import url('https://fonts.googleapis.com/css2?family=Inter:wght@900&display=swap');
html, html,
body, body,
@ -41,4 +41,4 @@ a:hover{
footer { footer {
margin-top: 40px; margin-top: 40px;
} }
} } */

View File

@ -5,7 +5,7 @@ class App extends React.Component {
render() { render() {
return ( return (
<div className="content"> <div className="content bg-slate-400">
<Navbar /> <Navbar />
<ConfigCover /> <ConfigCover />
</div> </div>

View File

@ -79,6 +79,16 @@ input {
background-color: #f2f2f2; background-color: #f2f2f2;
} }
.input-color{
padding:1px;
width:40px;
height:40px;
}
.font-size{
padding:2px;
width:50px;
}
.input-md{ .input-md{
width:100px; width:100px;

View File

@ -59,47 +59,23 @@ class ConfigCover extends React.Component {
></input> ></input>
<div className="border rounded my-2 ml-2 p-1"> <div className=" rounded my-2 ml-2 p-1">
<h6 className="">Background</h6> {/* <h6 className="">Background</h6> */}
<div className="flex-card"> <div className="flex-card">
<div className="mt-3 mx-2"> <div className=" border rounded p-1 flex-row ">
<span>Color</span> <span>{ this.state.bgColor}</span>
<input type="color" value={this.state.bgColor} <input type="color" value={this.state.bgColor}
onChange={(e) => this.setState({ bgColor: e.target.value })} onChange={(e) => this.setState({ bgColor: e.target.value })}
className="input-md form-control" className="input-color form-control"
/> />
</div> </div>
<div className="mx-2"> <div className="flex-row">
<label>Pattern</label> <span>Font size</span>
<select <input type="number" className="font-size" min="20"/>
onChange={(e) => this.setState({ pattern: e.target.value })} </div>
className="form-control input-md"
value={this.state.pattern}>
<option>None</option>
<option>graph-paper</option>
<option>jigsaw</option>
<option>hideout</option>
<option>dots</option>
<option>falling-triangles</option>
<option>circuit-board</option>
<option>temple</option>
<option>anchors</option>
<option>brickwall</option>
<option>overlapping-circles</option>
<option>wiggle</option>
<option>tic-tac-toe</option>
<option>leaf</option>
<option>bubbles</option>
<option>squares</option>
<option>explorer</option>
<option>jupiter</option>
<option>sun</option>
</select>
</div>
</div> </div>
</div> </div>

View File

@ -4,7 +4,7 @@ import logo from '../assets/icons/favicon.png';
const Navbar = () => { const Navbar = () => {
return ( return (
<nav className="navbar"> <nav className=" bg-red-200 text-4xl">
<h4><img src={logo} alt="logo" className="logo"/>Coverview</h4> <h4><img src={logo} alt="logo" className="logo"/>Coverview</h4>
<a href="https://github.com/rutikwankhade/CoverView" <a href="https://github.com/rutikwankhade/CoverView"
target="_blank" rel="noopener noreferrer" class="star-btn"> target="_blank" rel="noopener noreferrer" class="star-btn">

3
src/index.css Normal file
View File

@ -0,0 +1,3 @@
@tailwind base;
@tailwind components;
@tailwind utilities;

View File

@ -1,5 +1,6 @@
import React from 'react'; import React from 'react';
import ReactDOM from 'react-dom'; import ReactDOM from 'react-dom';
import './index.css';
import App from './components/App'; import App from './components/App';

9
tailwind.config.js Normal file
View File

@ -0,0 +1,9 @@
module.exports = {
content: [
"./src/**/*.{js,jsx,ts,tsx}",
],
theme: {
extend: {},
},
plugins: [],
}