@grantbii/design-system 1.0.27 → 1.0.29
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/{molecules → atoms}/Badge.d.ts +2 -1
- package/core/atoms/Badge.js +28 -0
- package/core/atoms/LinkButton.d.ts +12 -0
- package/core/atoms/LinkButton.js +19 -0
- package/core/global/GlobalStyle.js +1 -1
- package/index.d.ts +3 -2
- package/index.js +3 -2
- package/package.json +1 -1
- package/stories/{molecules → atoms}/Badge.stories.d.ts +1 -0
- package/stories/atoms/Badge.stories.js +46 -0
- package/stories/atoms/BrandLogo.stories.js +1 -1
- package/stories/atoms/LinkButton.stories.d.ts +8 -0
- package/stories/atoms/LinkButton.stories.js +27 -0
- package/tsconfig.tsbuildinfo +1 -1
- package/core/molecules/Badge.js +0 -23
- package/stories/molecules/Badge.stories.js +0 -35
- /package/core/{atoms → foundation}/colors.d.ts +0 -0
- /package/core/{atoms → foundation}/colors.js +0 -0
package/core/molecules/Badge.js
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import styled from "styled-components";
|
|
3
|
-
import { Colors, Icons } from "../../index";
|
|
4
|
-
const Badge = ({ icon, text, onClickClose, backgroundColor = Colors.neutral.grey3, color = Colors.typography.blackHigh, }) => (_jsxs(BaseBadge, { "$backgroundColor": backgroundColor, "$color": color, children: [icon ? icon : _jsx(_Fragment, {}), text ? _jsx(BadgeText, { children: text }) : _jsx(_Fragment, {}), onClickClose ? (_jsx(Button, { type: "button", onClick: onClickClose, children: _jsx(Icons.XIcon, { size: 20 }) })) : (_jsx(_Fragment, {}))] }));
|
|
5
|
-
export default Badge;
|
|
6
|
-
const BaseBadge = styled.div `
|
|
7
|
-
display: flex;
|
|
8
|
-
align-items: center;
|
|
9
|
-
gap: 10px;
|
|
10
|
-
|
|
11
|
-
padding: 5px 16px;
|
|
12
|
-
border-radius: 130px;
|
|
13
|
-
|
|
14
|
-
background-color: ${({ $backgroundColor }) => $backgroundColor};
|
|
15
|
-
color: ${({ $color }) => $color};
|
|
16
|
-
`;
|
|
17
|
-
const BadgeText = styled.p `
|
|
18
|
-
font-weight: 500;
|
|
19
|
-
font-size: 14px;
|
|
20
|
-
`;
|
|
21
|
-
const Button = styled.button `
|
|
22
|
-
display: flex;
|
|
23
|
-
`;
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { Badge, Icons } from "@/.";
|
|
3
|
-
const meta = {
|
|
4
|
-
title: "Design System/Atoms/Badge",
|
|
5
|
-
component: Badge,
|
|
6
|
-
tags: ["autodocs"],
|
|
7
|
-
parameters: {
|
|
8
|
-
layout: "centered",
|
|
9
|
-
},
|
|
10
|
-
};
|
|
11
|
-
export default meta;
|
|
12
|
-
export const Default = {
|
|
13
|
-
args: {
|
|
14
|
-
text: "Badge",
|
|
15
|
-
},
|
|
16
|
-
};
|
|
17
|
-
export const Icon = {
|
|
18
|
-
args: {
|
|
19
|
-
icon: _jsx(Icons.SmileyXEyesIcon, { size: 20 }),
|
|
20
|
-
text: "Badge",
|
|
21
|
-
},
|
|
22
|
-
};
|
|
23
|
-
export const Close = {
|
|
24
|
-
args: {
|
|
25
|
-
text: "Badge",
|
|
26
|
-
onClickClose: () => alert("closed badge"),
|
|
27
|
-
},
|
|
28
|
-
};
|
|
29
|
-
export const Everything = {
|
|
30
|
-
args: {
|
|
31
|
-
icon: _jsx(Icons.SmileyXEyesIcon, { size: 20 }),
|
|
32
|
-
text: "Badge",
|
|
33
|
-
onClickClose: () => alert("You have closed the badge!"),
|
|
34
|
-
},
|
|
35
|
-
};
|
|
File without changes
|
|
File without changes
|