fix: update button styles and variants for consistency across forms
This commit is contained in:
parent
7f7526783f
commit
a45a6fb87e
4
.vscode/settings.json
vendored
4
.vscode/settings.json
vendored
@ -25,6 +25,8 @@
|
|||||||
"labelClassName",
|
"labelClassName",
|
||||||
"buttonClassName",
|
"buttonClassName",
|
||||||
"leftNodeClassName",
|
"leftNodeClassName",
|
||||||
"rightNodeClassName"
|
"rightNodeClassName",
|
||||||
|
"buttonVariants",
|
||||||
|
"cva"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@ -8,11 +8,14 @@ const buttonVariants = cva(
|
|||||||
{
|
{
|
||||||
variants: {
|
variants: {
|
||||||
variant: {
|
variant: {
|
||||||
newsPrimary: 'bg-[#2E2F7C] text-white text-lg',
|
newsPrimary:
|
||||||
newsPrimaryOutline: 'border-[3px] border-white text-white text-lg',
|
'bg-[#2E2F7C] text-white text-lg hover:bg-[#4C5CA0] hover:shadow transition active:bg-[#6970B4]',
|
||||||
newsSecondary: 'border-[3px] border-[#2E2F7C] text-[#2E2F7C] text-lg',
|
newsPrimaryOutline:
|
||||||
|
'border-[3px] bg-[#2E2F7C] border-white text-white text-lg hover:bg-[#4C5CA0] hover:shadow-lg active:shadow-2xl transition active:bg-[#6970B4]',
|
||||||
|
newsSecondary:
|
||||||
|
'border-[3px] bg-white hover:shadow-lg active:shadow-2xl border-[#2E2F7C] text-[#2E2F7C] hover:text-[#4C5CA0] active:text-[#6970B4] text-lg hover:border-[#4C5CA0] transition active:border-[#6970B4]',
|
||||||
icon: '',
|
icon: '',
|
||||||
link: '',
|
link: 'font-semibold text-[#2E2F7C] hover:text-[#4C5CA0] active:text-[#6970B4] transition',
|
||||||
},
|
},
|
||||||
size: {
|
size: {
|
||||||
default: 'h-[50px] w-[150px]',
|
default: 'h-[50px] w-[150px]',
|
||||||
|
|||||||
@ -22,7 +22,7 @@ export const FormForgotPassword = () => {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Tombol Masuk */}
|
{/* Tombol Masuk */}
|
||||||
<Button className="mt-5 w-full rounded-md bg-[#2E2F7C] py-2 text-white transition hover:bg-blue-800">
|
<Button className="mt-5 w-full rounded-md py-2">
|
||||||
Reset Password
|
Reset Password
|
||||||
</Button>
|
</Button>
|
||||||
</form>
|
</form>
|
||||||
|
|||||||
@ -87,7 +87,6 @@ export const FormLogin = () => {
|
|||||||
setIsLoginOpen(false)
|
setIsLoginOpen(false)
|
||||||
setIsForgetOpen(true)
|
setIsForgetOpen(true)
|
||||||
}}
|
}}
|
||||||
className="font-semibold text-[#2E2F7C]"
|
|
||||||
variant="link"
|
variant="link"
|
||||||
size="fit"
|
size="fit"
|
||||||
>
|
>
|
||||||
@ -98,7 +97,7 @@ export const FormLogin = () => {
|
|||||||
<Button
|
<Button
|
||||||
disabled={disabled}
|
disabled={disabled}
|
||||||
type="submit"
|
type="submit"
|
||||||
className="w-full rounded-md bg-[#2E2F7C] py-2 text-white transition hover:bg-blue-800"
|
className="w-full rounded-md py-2"
|
||||||
>
|
>
|
||||||
Masuk
|
Masuk
|
||||||
</Button>
|
</Button>
|
||||||
@ -113,7 +112,6 @@ export const FormLogin = () => {
|
|||||||
setIsLoginOpen(false)
|
setIsLoginOpen(false)
|
||||||
setIsRegisterOpen(true)
|
setIsRegisterOpen(true)
|
||||||
}}
|
}}
|
||||||
className="font-semibold text-[#2E2F7C]"
|
|
||||||
variant="link"
|
variant="link"
|
||||||
size="fit"
|
size="fit"
|
||||||
>
|
>
|
||||||
|
|||||||
@ -122,7 +122,7 @@ export const FormRegister = () => {
|
|||||||
<Button
|
<Button
|
||||||
disabled={disabled}
|
disabled={disabled}
|
||||||
type="submit"
|
type="submit"
|
||||||
className="w-full rounded-md bg-[#2E2F7C] py-2 text-white transition hover:bg-blue-800"
|
className="w-full rounded-md py-2"
|
||||||
>
|
>
|
||||||
Daftar
|
Daftar
|
||||||
</Button>
|
</Button>
|
||||||
@ -137,7 +137,6 @@ export const FormRegister = () => {
|
|||||||
setIsLoginOpen(true)
|
setIsLoginOpen(true)
|
||||||
setIsRegisterOpen(false)
|
setIsRegisterOpen(false)
|
||||||
}}
|
}}
|
||||||
className="font-semibold text-[#2E2F7C]"
|
|
||||||
variant="link"
|
variant="link"
|
||||||
size="fit"
|
size="fit"
|
||||||
>
|
>
|
||||||
|
|||||||
@ -79,7 +79,7 @@ export default function FormSubscription() {
|
|||||||
<Button
|
<Button
|
||||||
disabled={disabled}
|
disabled={disabled}
|
||||||
type="submit"
|
type="submit"
|
||||||
className="mt-5 w-full rounded-md bg-[#2E2F7C] py-2 text-white transition hover:bg-blue-800"
|
className="mt-5 w-full rounded-md py-2"
|
||||||
>
|
>
|
||||||
Lanjutkan
|
Lanjutkan
|
||||||
</Button>
|
</Button>
|
||||||
|
|||||||
@ -71,7 +71,7 @@ export default function HeaderMenuMobile(properties: THeaderMenuMobile) {
|
|||||||
>
|
>
|
||||||
<Button
|
<Button
|
||||||
variant="newsSecondary"
|
variant="newsSecondary"
|
||||||
className="w-full bg-white px-[35px] py-3 text-center text-[#2E2F7C] sm:hidden"
|
className="w-full px-[35px] py-3 text-center sm:hidden"
|
||||||
type="submit"
|
type="submit"
|
||||||
>
|
>
|
||||||
Logout
|
Logout
|
||||||
@ -80,7 +80,7 @@ export default function HeaderMenuMobile(properties: THeaderMenuMobile) {
|
|||||||
) : (
|
) : (
|
||||||
<Button
|
<Button
|
||||||
variant="newsSecondary"
|
variant="newsSecondary"
|
||||||
className="w-full bg-white px-[35px] py-3 text-center text-[#2E2F7C] sm:hidden"
|
className="w-full px-[35px] py-3 text-center sm:hidden"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
setIsMenuOpen(false)
|
setIsMenuOpen(false)
|
||||||
setIsLoginOpen(true)
|
setIsLoginOpen(true)
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
import { Link, useRouteLoaderData } from 'react-router'
|
import { Link, useRouteLoaderData } from 'react-router'
|
||||||
|
|
||||||
|
import { Button } from '~/components/ui/button'
|
||||||
import HeaderMenuMobile from '~/layouts/news/header-menu-mobile'
|
import HeaderMenuMobile from '~/layouts/news/header-menu-mobile'
|
||||||
import type { loader } from '~/routes/_news'
|
import type { loader } from '~/routes/_news'
|
||||||
|
|
||||||
@ -17,15 +18,17 @@ export const HeaderMenu = () => {
|
|||||||
<>
|
<>
|
||||||
<div className="hidden h-[60px] items-center justify-between bg-[#2E2F7C] text-xl font-medium text-white sm:flex">
|
<div className="hidden h-[60px] items-center justify-between bg-[#2E2F7C] text-xl font-medium text-white sm:flex">
|
||||||
{menu?.map((item) => (
|
{menu?.map((item) => (
|
||||||
<Link
|
<Button
|
||||||
|
as={Link}
|
||||||
key={item.id}
|
key={item.id}
|
||||||
to={`/category/${item.code}`}
|
to={`/category/${item.code}`}
|
||||||
|
size="fit"
|
||||||
className={
|
className={
|
||||||
'flex h-full items-center justify-center border-r border-white px-[35px]'
|
'flex h-full items-center justify-center border-r border-white px-[35px] text-xl'
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
{item.name}
|
{item.name}
|
||||||
</Link>
|
</Button>
|
||||||
))}
|
))}
|
||||||
<HeaderSearch />
|
<HeaderSearch />
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user