mirror of
https://github.com/nextui-org/nextui.git
synced 2025-12-08 19:26:11 +00:00
chore(button): updated from main
This commit is contained in:
parent
6397115575
commit
31723c6c71
@ -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",
|
||||
|
||||
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user