Unverified Commit 55f37664 authored by boojack's avatar boojack Committed by GitHub

chore: add theme file for joyui (#635)

parent ab8e3473
...@@ -6,6 +6,7 @@ import { locationService } from "./services"; ...@@ -6,6 +6,7 @@ import { locationService } from "./services";
import { useAppSelector } from "./store"; import { useAppSelector } from "./store";
import router from "./router"; import router from "./router";
import * as storage from "./helpers/storage"; import * as storage from "./helpers/storage";
import theme from "./theme";
function App() { function App() {
const { i18n } = useTranslation(); const { i18n } = useTranslation();
...@@ -41,7 +42,7 @@ function App() { ...@@ -41,7 +42,7 @@ function App() {
}, [locale]); }, [locale]);
return ( return (
<CssVarsProvider> <CssVarsProvider theme={theme}>
<RouterProvider router={router} /> <RouterProvider router={router} />
</CssVarsProvider> </CssVarsProvider>
); );
......
...@@ -21,7 +21,7 @@ const ApperanceSelect = () => { ...@@ -21,7 +21,7 @@ const ApperanceSelect = () => {
return ( return (
<Select <Select
className="!min-w-[12rem] w-auto text-sm" className="!min-w-[10rem] w-auto text-sm"
value={apperance} value={apperance}
onChange={(_, value) => { onChange={(_, value) => {
setApperance(value as Apperance); setApperance(value as Apperance);
......
...@@ -34,7 +34,7 @@ const SearchBar = () => { ...@@ -34,7 +34,7 @@ const SearchBar = () => {
<div className="search-bar-container"> <div className="search-bar-container">
<div className="search-bar-inputer"> <div className="search-bar-inputer">
<Icon.Search className="icon-img" /> <Icon.Search className="icon-img" />
<input className="text-input" type="text" placeholder="" value={queryText} onChange={handleTextQueryInput} /> <input className="text-input" autoComplete="off" type="text" placeholder="" value={queryText} onChange={handleTextQueryInput} />
</div> </div>
<div className="quickly-action-wrapper"> <div className="quickly-action-wrapper">
<div className="quickly-action-container"> <div className="quickly-action-container">
......
...@@ -63,7 +63,6 @@ const UserBanner = () => { ...@@ -63,7 +63,6 @@ const UserBanner = () => {
}; };
const handleSignOutBtnClick = async () => { const handleSignOutBtnClick = async () => {
userService.doSignOut().catch();
navigate("/auth"); navigate("/auth");
}; };
......
...@@ -3,10 +3,6 @@ ...@@ -3,10 +3,6 @@
&:hover, &:hover,
&:active { &:active {
> .search-bar-inputer > .text-input {
@apply flex;
}
> .quickly-action-wrapper { > .quickly-action-wrapper {
@apply flex; @apply flex;
} }
...@@ -20,7 +16,7 @@ ...@@ -20,7 +16,7 @@
} }
> .text-input { > .text-input {
@apply hidden sm:flex ml-2 w-24 grow text-sm outline-none bg-transparent; @apply flex ml-2 w-24 grow text-sm outline-none bg-transparent;
} }
} }
......
import { Option, Select } from "@mui/joy"; import { Option, Select } from "@mui/joy";
import { useState } from "react"; import { useEffect, useState } from "react";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { useNavigate } from "react-router-dom"; import { useNavigate } from "react-router-dom";
import { useAppSelector } from "../store"; import { useAppSelector } from "../store";
...@@ -28,6 +28,10 @@ const Auth = () => { ...@@ -28,6 +28,10 @@ const Auth = () => {
const [username, setUsername] = useState(mode === "dev" ? "demohero" : ""); const [username, setUsername] = useState(mode === "dev" ? "demohero" : "");
const [password, setPassword] = useState(mode === "dev" ? "secret" : ""); const [password, setPassword] = useState(mode === "dev" ? "secret" : "");
useEffect(() => {
userService.doSignOut().catch();
}, []);
const handleUsernameInputChanged = (e: React.ChangeEvent<HTMLInputElement>) => { const handleUsernameInputChanged = (e: React.ChangeEvent<HTMLInputElement>) => {
const text = e.target.value as string; const text = e.target.value as string;
setUsername(text); setUsername(text);
......
import { extendTheme } from "@mui/joy";
const theme = extendTheme({
components: {
JoySelect: {
styleOverrides: {
root: {
fontSize: "0.875rem",
},
},
},
},
});
export default theme;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment