odaptos_design_system 1.4.7 → 1.4.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Buttons/IconButton.d.ts +1 -1
- package/dist/odaptos_design_system.cjs.development.js +3 -1
- package/dist/odaptos_design_system.cjs.development.js.map +1 -1
- package/dist/odaptos_design_system.cjs.production.min.js +1 -1
- package/dist/odaptos_design_system.cjs.production.min.js.map +1 -1
- package/dist/odaptos_design_system.esm.js +3 -1
- package/dist/odaptos_design_system.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/Buttons/IconButton.tsx +2 -0
|
@@ -6,4 +6,4 @@ export interface IconButtonProps extends HTMLAttributes<HTMLButtonElement> {
|
|
|
6
6
|
className?: string;
|
|
7
7
|
}
|
|
8
8
|
/** Figma link : https://www.figma.com/file/fjnhhbL12HvKccPmJchVnr/Atomic-Library?type=design&node-id=422-2878&mode=dev */
|
|
9
|
-
export declare const IconButton: ({ variant, size, icon, className, ...props }: IconButtonProps) => React.JSX.Element;
|
|
9
|
+
export declare const IconButton: ({ variant, size, icon, className, onClick, ...props }: IconButtonProps) => React.JSX.Element;
|
|
@@ -96,6 +96,7 @@ const IconButton = ({
|
|
|
96
96
|
size = 'base',
|
|
97
97
|
icon,
|
|
98
98
|
className,
|
|
99
|
+
onClick,
|
|
99
100
|
...props
|
|
100
101
|
}) => {
|
|
101
102
|
const getStylesByVariant = () => {
|
|
@@ -106,7 +107,8 @@ const IconButton = ({
|
|
|
106
107
|
if (size === 'xs') return styles$2.icon_button_xs;else if (size === 'base') return styles$2.icon_button_base;else if (size === 'lg') return styles$2.icon_button_lg;else return styles$2.icon_button_base;
|
|
107
108
|
};
|
|
108
109
|
return /*#__PURE__*/React__default.createElement("button", Object.assign({
|
|
109
|
-
className: `${styles$2.icon_button} ${getStylesByVariant()} ${getStylesBySize()} ${className ?? ''}
|
|
110
|
+
className: `${styles$2.icon_button} ${getStylesByVariant()} ${getStylesBySize()} ${className ?? ''}`,
|
|
111
|
+
onClick: onClick
|
|
110
112
|
}, props), icon ?? /*#__PURE__*/React__default.createElement(MinusCircledIcon, null));
|
|
111
113
|
};
|
|
112
114
|
|