diff --git a/src/mui/components/button/ButtonMultiSelect.tsx b/src/mui/components/button/ButtonMultiSelect.tsx index 4b78bba7..f8c0f833 100644 --- a/src/mui/components/button/ButtonMultiSelect.tsx +++ b/src/mui/components/button/ButtonMultiSelect.tsx @@ -9,7 +9,6 @@ * Usage: * To use this component, define an array of ButtonConfig objects, each representing a button's configuration. * Pass this array along with a localStorage key (for saving the selected button's state) to the component. - * Optionally, you can also specify the size of the buttons (see https://mui.com/material-ui/react-button/#sizes). * * Example: * ``` @@ -20,6 +19,8 @@ * ]} * localStorageKey="myButtonSelectKey" * size="medium" + * isLoading={false} + * isCompact={true} * /> * ``` */ @@ -46,6 +47,7 @@ type ButtonMultiSelectProps = { size?: "small" | "medium" | "large"; localStorageKey: string; isLoading?: boolean; + isCompact?: boolean; }; function ButtonMultiSelect({ @@ -54,6 +56,7 @@ function ButtonMultiSelect({ size = "small", localStorageKey, isLoading = false, + isCompact = false, }: ButtonMultiSelectProps) { const [anchorEl, setAnchorEl] = useState(null); const [selectedOption, setSelectedOption] = useState(buttonConfigs[0]); @@ -87,11 +90,7 @@ function ButtonMultiSelect({ return ( <> - + }> - {selectedOption.label} + startIcon={ + !isCompact && + }> + {isCompact ? ( + + ) : ( + selectedOption.label + )}