Преглед изворни кода

fix: button component will refresh page (#5420)

tags/0.6.12
Joel пре 1 година
родитељ
комит
51d34f5936
No account linked to committer's email address
2 измењених фајлова са 7 додато и 4 уклоњено
  1. 6
    4
      web/app/components/base/button/index.css
  2. 1
    0
      web/app/components/base/button/index.tsx

+ 6
- 4
web/app/components/base/button/index.css Прегледај датотеку

@layer components { @layer components {
.btn { .btn {
@apply inline-flex justify-center items-center content-center h-9 leading-5 rounded-lg px-4 py-2 text-base cursor-pointer whitespace-nowrap; @apply inline-flex justify-center items-center content-center h-9 leading-5 rounded-lg px-4 py-2 text-base cursor-pointer whitespace-nowrap;
};
}

;


.btn-default { .btn-default {
@apply border-solid border border-gray-200 cursor-pointer text-gray-700 hover:bg-white hover:shadow-sm hover:border-gray-300; @apply border-solid border border-gray-200 cursor-pointer text-gray-700 hover:bg-white hover:shadow-sm hover:border-gray-300;
@apply border-solid border border-gray-200 bg-gray-200 cursor-not-allowed text-gray-800; @apply border-solid border border-gray-200 bg-gray-200 cursor-not-allowed text-gray-800;
} }


.btn-primary {
body .btn-primary {
@apply bg-primary-600 hover:bg-primary-600/75 cursor-pointer text-white hover:shadow-sm; @apply bg-primary-600 hover:bg-primary-600/75 cursor-pointer text-white hover:shadow-sm;
} }


.btn-primary-disabled {
body .btn-primary-disabled {
@apply bg-primary-200 cursor-not-allowed text-white; @apply bg-primary-200 cursor-not-allowed text-white;
} }


.btn-warning-disabled { .btn-warning-disabled {
@apply bg-red-600/75 cursor-not-allowed text-white; @apply bg-red-600/75 cursor-not-allowed text-white;
} }
}
}

+ 1
- 0
web/app/components/base/button/index.tsx Прегледај датотеку

({ className, variant, loading, children, ...props }, ref) => { ({ className, variant, loading, children, ...props }, ref) => {
return ( return (
<button <button
type='button'
className={classNames(buttonVariants({ variant, className }))} className={classNames(buttonVariants({ variant, className }))}
ref={ref} ref={ref}
{...props} {...props}

Loading…
Откажи
Сачувај