diff --git a/components/navbar.tsx b/components/navbar.tsx index 0caba23..46eee11 100644 --- a/components/navbar.tsx +++ b/components/navbar.tsx @@ -1,6 +1,6 @@ import { usePathname } from 'next/navigation' import { NavBar, NavLink, NavWrap } from './styles/navbar'; -import StyleSelector from './themeselector'; +import { StyleSelector, StyleSelectorPlaceholder } from './themeselector'; const navLinks = [ { name: "Home", href: "/" }, @@ -24,8 +24,8 @@ const PageNavbar = () => { Mastodon - + ); } diff --git a/components/styles/navbar.tsx b/components/styles/navbar.tsx index 88c8037..01eb8e3 100644 --- a/components/styles/navbar.tsx +++ b/components/styles/navbar.tsx @@ -14,6 +14,7 @@ export const NavWrap = styled.div` ` export const NavBar = styled.nav` + margin-right: 1%; display: flex; flex: 1; padding: 2rem 0; @@ -30,6 +31,7 @@ export const NavLink = styled(Link)` display: flex; justify-content: center; align-items: center; + transition: color 0.15s ease, border-color 0.15s ease; &:hover { color: ${({ theme }) => theme.colors.secondary}; diff --git a/components/styles/themedropdown.tsx b/components/styles/themedropdown.tsx index 5f46e2f..43f9528 100644 --- a/components/styles/themedropdown.tsx +++ b/components/styles/themedropdown.tsx @@ -23,11 +23,9 @@ export const ThemeDropDownButton = styled.button` padding: 0.2rem 0.5rem; cursor: pointer; color: ${({ theme }) => theme.colors.primary}; + transition: color 0.15s ease; - &:hover { - color: ${({ theme }) => theme.colors.secondary}; - } - &:focus { + &:focus,:hover { color: ${({ theme }) => theme.colors.secondary}; } ` diff --git a/components/themeselector.tsx b/components/themeselector.tsx index 65acea4..cd1bbd4 100644 --- a/components/themeselector.tsx +++ b/components/themeselector.tsx @@ -11,7 +11,7 @@ const themes = [ amoled2Theme, ] -const StyleSelector = () => { +export const StyleSelector = () => { const updateTheme = useUpdateTheme(); const currentTheme = useContext(ThemeContext); const [selectedTheme, setSelectedTheme] = useState(themes[currentTheme.themeId]); @@ -56,10 +56,11 @@ const StyleSelector = () => { ); } -{/* - - - */} +export const StyleSelectorPlaceholder = () => { + return ( + + ) +} export function getTheme(themeId: number): DefaultTheme { let theme: DefaultTheme;