@monolith-forensics/monolith-ui 1.2.30 → 1.2.31
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/Button/Button.d.ts +1 -0
- package/dist/Button/Button.js +2 -2
- package/package.json +1 -1
package/dist/Button/Button.d.ts
CHANGED
|
@@ -14,6 +14,7 @@ export interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
|
14
14
|
color?: string;
|
|
15
15
|
disabled?: boolean;
|
|
16
16
|
selected?: boolean;
|
|
17
|
+
justify?: "start" | "center" | "end";
|
|
17
18
|
onClick?: (event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
18
19
|
}
|
|
19
20
|
declare const Button: import("react").ForwardRefExoticComponent<ButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
|
package/dist/Button/Button.js
CHANGED
|
@@ -325,8 +325,8 @@ const StyledLoader = styled.span `
|
|
|
325
325
|
}
|
|
326
326
|
`;
|
|
327
327
|
const Button = forwardRef((props, ref) => {
|
|
328
|
-
const { children, loading = false, leftSection = null, rightSection = null, href = null, download = null } = props, other = __rest(props, ["children", "loading", "leftSection", "rightSection", "href", "download"]);
|
|
329
|
-
const buttonContent = (_jsx("span", { className: "inner-span", style: { height: "100%", width: "100%" }, children: loading ? (_jsx(StyledLoader, { children: _jsx(Loader2Icon, {}) })) : (_jsxs(_Fragment, { children: [leftSection && _jsx("span", { "data-position": "left", children: leftSection }), _jsx("span", { className: "button-label", children: children }), rightSection && _jsx("span", { "data-position": "right", children: rightSection })] })) }));
|
|
328
|
+
const { children, loading = false, leftSection = null, rightSection = null, href = null, download = null, justify = "center" } = props, other = __rest(props, ["children", "loading", "leftSection", "rightSection", "href", "download", "justify"]);
|
|
329
|
+
const buttonContent = (_jsx("span", { className: "inner-span", style: { height: "100%", width: "100%", justifyContent: justify }, children: loading ? (_jsx(StyledLoader, { children: _jsx(Loader2Icon, {}) })) : (_jsxs(_Fragment, { children: [leftSection && _jsx("span", { "data-position": "left", children: leftSection }), _jsx("span", { className: "button-label", children: children }), rightSection && _jsx("span", { "data-position": "right", children: rightSection })] })) }));
|
|
330
330
|
return (_jsx(StyledButton, Object.assign({ ref: ref }, other, { children: href ? (_jsx(StyledAnchor, { href: href, download: download, children: buttonContent })) : (buttonContent) })));
|
|
331
331
|
});
|
|
332
332
|
export default Button;
|