File tree Expand file tree Collapse file tree 8 files changed +281
-23
lines changed
components/Elements/Button Expand file tree Collapse file tree 8 files changed +281
-23
lines changed Original file line number Diff line number Diff line change 44 "tabWidth": 2,
55 "semi": false,
66 "singleQuote": true,
7- "jsxBracketSameLine": true
8- }
7+ "jsxBracketSameLine": true,
8+ "plugins": ["prettier-plugin-tailwindcss"],
9+ "tailwindStylesheet": "./src/assets/index.css"
10+ }
Original file line number Diff line number Diff line change 77 < meta name ="theme-color " content ="#000000 " />
88 < link rel ="apple-touch-icon " href ="/logo192.png " />
99 < link rel ="preconnect " href ="https://hackertab.dev " />
10+ < link href ="/src/styles.css " rel ="stylesheet " />
1011 < script src ="/startup.js "> </ script >
1112
1213 < % if (isWebBuild) { %>
13- < title > Hackertab</ title >
14- < link rel ="manifest " href ="/web_manifest.json " />
14+ < title > Hackertab</ title >
15+ < link rel ="manifest " href ="/web_manifest.json " />
1516 < % } else { %>
16- < title > New Tab</ title >
17+ < title > New Tab</ title >
1718 < %}%>
1819 </ head >
1920 < body class ="preload ">
2021 < noscript > You need to enable JavaScript to run this app.</ noscript >
2122 < div id ="root "> </ div >
2223 < script type ="module " src ="/src/index.tsx "> </ script >
23-
2424 </ body >
2525</ html >
Original file line number Diff line number Diff line change 44 "private" : false ,
55 "dependencies" : {
66 "@amplitude/analytics-browser" : " ^1.5.5" ,
7+ "@tailwindcss/vite" : " ^4.1.5" ,
78 "@tanstack/query-async-storage-persister" : " ^5.8.3" ,
89 "@tanstack/react-query" : " ^4.13.0" ,
910 "@tanstack/react-query-persist-client" : " ^5.8.4" ,
3334 "react-spring-bottom-sheet" : " ^3.4.1" ,
3435 "react-toggle" : " ^4.1.1" ,
3536 "react-tooltip" : " ^4.2.21" ,
37+ "tailwindcss" : " ^4.1.5" ,
3638 "timeago.js" : " ^4.0.2" ,
3739 "type-fest" : " ^1.2.0" ,
3840 "vite-plugin-ejs" : " ^1.6.4" ,
8789 "eslint-plugin-prettier" : " ^4.2.1" ,
8890 "eslint-plugin-react" : " ^7.28.0" ,
8991 "eslint-plugin-react-hooks" : " ^4.3.0" ,
90- "prettier" : " ^2.7.1" ,
92+ "prettier" : " ^3.5.3" ,
93+ "prettier-plugin-tailwindcss" : " ^0.6.11" ,
9194 "terser" : " ^5.19.2" ,
9295 "typescript" : " ^5.1.6" ,
9396 "vite" : " ^6.2.4" ,
Original file line number Diff line number Diff line change 1- @import 'variables.css' ;
1+ @import './ variables.css' ;
22
33html {
44 background : var (--background-color );
Original file line number Diff line number Diff line change 1- @import 'variables.css' ;
1+ @import 'tailwindcss' ;
2+ @import './variables.css' ;
23
34body {
45 margin : 0 ;
@@ -19,3 +20,12 @@ code {
1920 width : 100vw ;
2021 display : flex;
2122}
23+
24+ @custom-variant dark (& : where (.dark , .dark * ));
25+
26+ @theme {
27+ --color-btn-background-color : var (--button-background-color );
28+ --color-btn-hover-background-color : var (--button-hover-background-color );
29+ --color-btn-text-color : var (--button-text-color );
30+ --color-btn-hover-text-color : var (--button-hover-text-color );
31+ }
Original file line number Diff line number Diff line change 1- import clsx from 'clsx'
21import React from 'react'
32import { Spinner } from '../Spinner'
43import './Button.css'
@@ -26,14 +25,8 @@ export const Button = ({
2625 isLoading = false ,
2726} : ButtonProps ) => {
2827 return (
29- < button
30- className = { clsx (
31- 'button' ,
32- isLoading && 'loading' ,
33- sizes [ size ] ,
34- className ,
35- isLoading && 'disabled'
36- ) }
28+ < button
29+ className = "gap-2 px-4 bg-btn-background-color py-2 rounded-full hover:bg-btn-hover-background-color text-btn-text-color hover:text-btn-hover-text-color cursor-pointer justify-center items-center"
3730 onClick = { onClick }
3831 disabled = { isLoading } >
3932 { isLoading ? < Spinner size = "small" /> : startIcon }
Original file line number Diff line number Diff line change 1+ import tailwindcss from '@tailwindcss/vite'
12import react from '@vitejs/plugin-react'
23import path from 'path'
34import { defineConfig , loadEnv } from 'vite'
@@ -28,6 +29,7 @@ export default defineConfig(({ mode }) => {
2829 react ( ) ,
2930 viteTsconfigPaths ( ) ,
3031 svgrPlugin ( ) ,
32+ tailwindcss ( ) ,
3133 ] ,
3234 define : {
3335 'process.env' : { } ,
You can’t perform that action at this time.
0 commit comments