@grantbii/design-system 1.0.38 → 1.0.39
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/core/atoms/Badge.d.ts +3 -1
- package/core/atoms/Badge.js +1 -1
- package/core/molecules/Modal.js +1 -1
- package/package.json +1 -1
- package/tsconfig.tsbuildinfo +1 -1
package/core/atoms/Badge.d.ts
CHANGED
|
@@ -3,10 +3,12 @@ import { Icons } from "../foundations";
|
|
|
3
3
|
type BadgeProps = {
|
|
4
4
|
text: string;
|
|
5
5
|
Icon?: ComponentType<Icons.IconProps>;
|
|
6
|
+
iconSize?: string | number;
|
|
7
|
+
iconWeight?: Icons.IconWeight;
|
|
6
8
|
onClickClose?: MouseEventHandler<HTMLButtonElement>;
|
|
7
9
|
textWidthPixels?: number;
|
|
8
10
|
backgroundColor?: string;
|
|
9
11
|
color?: string;
|
|
10
12
|
};
|
|
11
|
-
declare const Badge: ({ Icon,
|
|
13
|
+
declare const Badge: ({ text, Icon, iconSize, iconWeight, onClickClose, textWidthPixels, backgroundColor, color, }: BadgeProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
14
|
export default Badge;
|
package/core/atoms/Badge.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import styled from "styled-components";
|
|
3
3
|
import { Colors, Icons } from "../foundations";
|
|
4
|
-
const Badge = ({ Icon,
|
|
4
|
+
const Badge = ({ text, Icon, iconSize = 20, iconWeight = "regular", onClickClose, textWidthPixels, backgroundColor, color, }) => (_jsxs(BaseBadge, { "$backgroundColor": backgroundColor, "$color": color, children: [Icon ? _jsx(Icon, { color: color, size: iconSize, weight: iconWeight }) : _jsx(_Fragment, {}), _jsx(BadgeText, { "$widthPixels": textWidthPixels, children: text }), onClickClose ? (_jsx(Button, { type: "button", onClick: onClickClose, children: _jsx(Icons.XIcon, { size: 12 }) })) : (_jsx(_Fragment, {}))] }));
|
|
5
5
|
export default Badge;
|
|
6
6
|
const BaseBadge = styled.div `
|
|
7
7
|
display: flex;
|
package/core/molecules/Modal.js
CHANGED