diff --git a/src/lib/button/ButtonIcon.tsx b/src/lib/button/ButtonIcon.tsx index 9315000..97ef9f2 100644 --- a/src/lib/button/ButtonIcon.tsx +++ b/src/lib/button/ButtonIcon.tsx @@ -6,9 +6,17 @@ const ButtonIcon: React.FC< Pick > = ({ Icon, icon, isDisabled, isLoading, variant }) => { const isSecondary = variant === "secondary"; - return ( - icon ?? - (Icon && ( + return icon ? ( + isLoading ? ( + + ) : ( + icon + ) + ) : ( + Icon && ( - )) + ) ); }; export default ButtonIcon; diff --git a/src/lib/dropdown/cascader/dropdown-container.tsx b/src/lib/dropdown/cascader/dropdown-container.tsx index 8c4e8f8..beb0ef4 100644 --- a/src/lib/dropdown/cascader/dropdown-container.tsx +++ b/src/lib/dropdown/cascader/dropdown-container.tsx @@ -19,6 +19,7 @@ interface IDropdownContainer "disabledKeys" | "defaultSelectedKey" | "items" | "callback" > { isOpen?: boolean; + className?: string; } const DropdownContainer: React.FC = ({ @@ -27,6 +28,7 @@ const DropdownContainer: React.FC = ({ disabledKeys, defaultSelectedKey, callback, + className, }) => { const gridRef = useRef(null); const [selectedKey, setSelectedKey] = useState( @@ -78,17 +80,19 @@ const DropdownContainer: React.FC = ({ return ( void; label?: string; + dropdownClassName?: string; } /** A Dropdown Cascader provides users with a way to navigate nested hierarchical information, @@ -29,6 +30,7 @@ function DropdownCascader({ disabledKeys, selectedKey, defaultSelectedKey, + dropdownClassName, ...props }: Readonly) { return ( @@ -56,6 +58,7 @@ function DropdownCascader({ defaultSelectedKey: selectedKey ?? defaultSelectedKey, disabledKeys, callback, + className: dropdownClassName, }} /> diff --git a/src/lib/dropdown/select/dropdown-container.tsx b/src/lib/dropdown/select/dropdown-container.tsx index a9875e5..13d4f07 100644 --- a/src/lib/dropdown/select/dropdown-container.tsx +++ b/src/lib/dropdown/select/dropdown-container.tsx @@ -3,24 +3,28 @@ import React from "react"; import { Collection, ListBox, Popover } from "react-aria-components"; import Scrollbar from "../../scrollbar"; import Item, { IItem } from "./item"; +import { cn } from "../../../utils"; -const DropdownContainer: React.FC<{ isOpen?: boolean; items: IItem[] }> = ({ - isOpen, - items, -}) => { +const DropdownContainer: React.FC<{ + isOpen?: boolean; + items: IItem[]; + className?: string; +}> = ({ isOpen, items, className }) => { return ( ) { const handleSelection = useCallback( @@ -64,7 +66,9 @@ function DropdownSelect({ )} - + )} diff --git a/src/lib/form/bignumber-field/index.tsx b/src/lib/form/bignumber-field/index.tsx index b6157da..a25f6d4 100644 --- a/src/lib/form/bignumber-field/index.tsx +++ b/src/lib/form/bignumber-field/index.tsx @@ -17,6 +17,8 @@ interface BigNumberFieldComponentProps extends BigNumberFieldProps { className?: string; /** The name of the input element, used when submitting an HTML form.*/ name?: string; + inputRef?: React.Ref; + buttonRef?: React.Ref; } /** A number field that handles big numbers. @@ -31,6 +33,8 @@ function BigNumberField({ isDisabled, isReadOnly, name, + inputRef, + buttonRef, ...props }: Readonly) { // Use our custom hook to get all the props and state @@ -44,7 +48,6 @@ function BigNumberField({ errorMessageProps, validationResult, } = useBigNumberField({ isDisabled, placeholder, isReadOnly, ...props }); - return (
{label && ( @@ -64,6 +67,7 @@ function BigNumberField({ <>