mirror of
https://github.com/vercel/commerce.git
synced 2025-05-17 15:06:59 +00:00
Requested style changes
This commit is contained in:
parent
49d713512a
commit
e222a52585
@ -3,7 +3,7 @@
|
||||
}
|
||||
|
||||
.button {
|
||||
@apply h-10 px-2 rounded-md border border-accent-2 flex items-center justify-center transition-colors ease-linear;
|
||||
@apply h-10 pl-2 pr-0.5 rounded-md border border-accent-2 flex items-center justify-center transition-colors ease-linear;
|
||||
}
|
||||
|
||||
.button:hover {
|
||||
|
@ -18,12 +18,21 @@ const ThemeSwitcher = () => {
|
||||
>
|
||||
<button
|
||||
className={
|
||||
'h-10 px-2 rounded-md border border-accent-2 flex items-center justify-center transition-colors ease-linear hover:border-accent-3 hover:shadow-sm'
|
||||
'w-[110px] h-10 pl-2 pr-0.5 rounded-md border border-accent-2 flex items-center justify-between transition-colors ease-linear hover:border-accent-3 hover:shadow-sm'
|
||||
}
|
||||
aria-label="Theme Switcher"
|
||||
>
|
||||
<span className="flex items-center">
|
||||
<ThemeIcon width={20} height={20} theme={theme} />
|
||||
<span className="capitalize leading-none ml-2">{theme}</span>
|
||||
<span
|
||||
className={cn('capitalize leading-none', {
|
||||
'text-sm ml-1.5': theme === 'system',
|
||||
'ml-2': theme !== 'system',
|
||||
})}
|
||||
>
|
||||
{theme}
|
||||
</span>
|
||||
</span>
|
||||
<span className="cursor-pointer">
|
||||
<ChevronRight
|
||||
className={cn('transition duration-300', {
|
||||
|
@ -3,7 +3,8 @@ import { useEffect, useState } from 'react'
|
||||
|
||||
export const useToggleTheme = () => {
|
||||
const { theme, themes, setTheme } = useTheme()
|
||||
const [themeValue, setThemeValue] = useState<string>()
|
||||
const [themeValue, setThemeValue] = useState<string>('system')
|
||||
|
||||
useEffect(() => setThemeValue(theme), [theme])
|
||||
|
||||
return { theme: themeValue, setTheme, themes }
|
||||
|
Loading…
x
Reference in New Issue
Block a user