chore(button): updated from main

This commit is contained in:
Junior Garcia 2022-12-25 12:36:25 -03:00
parent 6397115575
commit 31723c6c71
2 changed files with 4 additions and 3 deletions

View File

@ -1,6 +1,7 @@
import type {UseButtonProps} from "./use-button";
import {CSS} from '@nextui-org/system'
export const getColors = (props: UseButtonProps) => {
export const getColors = (props: UseButtonProps): CSS => {
if (!props.disabled) {
if (props.auto && props.color === "gradient" && (props.bordered || props.ghost)) {
return {
@ -11,7 +12,7 @@ export const getColors = (props: UseButtonProps) => {
return {};
}
const defaultDisabledCss = {
const defaultDisabledCss: CSS = {
bg: "$accents1",
color: "$accents7",
transform: "none",

View File

@ -246,7 +246,7 @@ export function useButton(props: UseButtonProps) {
return disabled ? "disabled" : "ready";
}, [disabled, isHovered, isPressed]);
const getIconCss = useMemo<any>(() => {
const getIconCss = useMemo<CSS | undefined>(() => {
if (isRightIcon) return iconRightCss;
return iconLeftCss;