button-component #29
@ -197,7 +197,7 @@
|
||||
--color-su-primary: #002f5f;
|
||||
--color-su-primary-80: #33587f;
|
||||
--bottom-nav-height: 4.5rem;
|
||||
font-family: 'TheSans', system-ui, Avenir, Helvetica, Arial, sans-serif;
|
||||
font-family: "TheSans", system-ui, Avenir, Helvetica, Arial, sans-serif;
|
||||
background-color: #ffffff;
|
||||
color: #000000;
|
||||
}
|
||||
@ -218,7 +218,6 @@
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
|
||||
.body-semibold-md {
|
||||
font-family: "TheSansB W5 Plain", system-ui, sans-serif;
|
||||
font-size: 16px;
|
||||
|
||||
@ -1,16 +1,16 @@
|
||||
import { useState, useEffect } from 'react';
|
||||
import Button from '../components/Button/Button';
|
||||
import { useState, useEffect } from "react";
|
||||
import Button from "../components/Button/Button";
|
||||
|
||||
export default function ComponentLibrary() {
|
||||
const [darkMode, setDarkMode] = useState(() => {
|
||||
|
stne3960 marked this conversation as resolved
Outdated
|
||||
return document.documentElement.classList.contains('dark');
|
||||
return document.documentElement.classList.contains("dark");
|
||||
});
|
||||
|
||||
useEffect(() => {
|
||||
if (darkMode) {
|
||||
document.documentElement.classList.add('dark');
|
||||
document.documentElement.classList.add("dark");
|
||||
} else {
|
||||
document.documentElement.classList.remove('dark');
|
||||
document.documentElement.classList.remove("dark");
|
||||
}
|
||||
}, [darkMode]);
|
||||
|
||||
@ -21,7 +21,7 @@ export default function ComponentLibrary() {
|
||||
<section className="mt-lg">
|
||||
<h2 className="mb-md">Dark Mode</h2>
|
||||
<Button variant="primary" onClick={() => setDarkMode(!darkMode)}>
|
||||
{darkMode ? 'Light Mode' : 'Dark Mode'}
|
||||
{darkMode ? "Light Mode" : "Dark Mode"}
|
||||
</Button>
|
||||
</section>
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import { defineConfig } from 'vite';
|
||||
import react from '@vitejs/plugin-react-swc';
|
||||
import tailwindcss from '@tailwindcss/vite';
|
||||
import { defineConfig } from "vite";
|
||||
|
stne3960 marked this conversation as resolved
Outdated
ansv7779
commented
This file needs to be ran through Prettier. This file needs to be ran through Prettier.
|
||||
import react from "@vitejs/plugin-react-swc";
|
||||
import tailwindcss from "@tailwindcss/vite";
|
||||
|
||||
// https://vite.dev/config/
|
||||
export default defineConfig({
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user
This file needs to be ran through Prettier.