Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat #174 - NotificationV2 updates, chore #175 - Extract out IconButton from WAM #176

Merged
merged 6 commits into from
Dec 14, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
"dependencies": {
"@ant-design/icons": "^4.2.2",
"@dassana-io/web-utils": "^0.7.2",
"@fortawesome/fontawesome-svg-core": "^1.2.32",
"@fortawesome/free-solid-svg-icons": "^5.15.1",
"@fortawesome/react-fontawesome": "^0.1.13",
"@storybook/addon-cssresources": "^6.0.28",
"@testing-library/jest-dom": "^4.2.4",
"@testing-library/react": "^9.5.0",
Expand Down
9 changes: 8 additions & 1 deletion rollup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,14 @@ const rootImport = options => ({
})

export default {
external: ['antd', 'react', 'uuid'],
external: [
'antd',
'@fortawesome/fontawesome-svg-core',
'@fortawesome/free-solid-svg-icons',
'@fortawesome/react-fontawesome',
'react',
'uuid'
],
input: 'src/components/index.ts',
output: [
{
Expand Down
151 changes: 117 additions & 34 deletions src/__snapshots__/storybook.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -229,12 +229,41 @@ exports[`Storyshots Icon Predefined 1`] = `
</div>
`;

exports[`Storyshots IconButton Default 1`] = `
<div
className="light storyWrapper-0-1-2"
>
<span
className="iconButton-0-1-10"
>
<svg
aria-hidden="true"
className="svg-inline--fa fa-times fa-w-11 icon-0-1-9 icon-d0-0-1-11"
data-icon="times"
data-prefix="fas"
focusable="false"
onClick={[Function]}
role="img"
style={Object {}}
viewBox="0 0 352 512"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M242.72 256l100.07-100.07c12.28-12.28 12.28-32.19 0-44.48l-22.24-22.24c-12.28-12.28-32.19-12.28-44.48 0L176 189.28 75.93 89.21c-12.28-12.28-32.19-12.28-44.48 0L9.21 111.45c-12.28 12.28-12.28 32.19 0 44.48L109.28 256 9.21 356.07c-12.28 12.28-12.28 32.19 0 44.48l22.24 22.24c12.28 12.28 32.2 12.28 44.48 0L176 322.72l100.07 100.07c12.28 12.28 32.2 12.28 44.48 0l22.24-22.24c12.28-12.28 12.28-32.19 0-44.48L242.72 256z"
fill="currentColor"
style={Object {}}
/>
</svg>
</span>
</div>
`;

exports[`Storyshots Input Default 1`] = `
<div
className="light storyWrapper-0-1-2"
>
<input
className="ant-input container-0-1-8 container-d0-0-1-11"
className="ant-input container-0-1-12 container-d0-0-1-15"
data-test="input"
disabled={false}
onBlur={[Function]}
Expand All @@ -253,7 +282,7 @@ exports[`Storyshots Input Error 1`] = `
className="light storyWrapper-0-1-2"
>
<input
className="ant-input container-0-1-8 container-d5-0-1-17 error-0-1-9"
className="ant-input container-0-1-12 container-d5-0-1-21 error-0-1-13"
data-test="input"
disabled={false}
onBlur={[Function]}
Expand All @@ -272,7 +301,7 @@ exports[`Storyshots Input Full Width 1`] = `
className="light storyWrapper-0-1-2"
>
<input
className="ant-input container-0-1-8 container-d4-0-1-16"
className="ant-input container-0-1-12 container-d4-0-1-20"
data-test="input"
disabled={false}
onBlur={[Function]}
Expand All @@ -291,13 +320,13 @@ exports[`Storyshots Input Loading 1`] = `
className="light storyWrapper-0-1-2"
>
<div
className="container-0-1-8 container-d3-0-1-14"
className="container-0-1-12 container-d3-0-1-18"
>
<div
className="inputSkeleton-0-1-10"
className="inputSkeleton-0-1-14"
>
<span
className="container-0-1-3 container-d1-0-1-15"
className="container-0-1-3 container-d1-0-1-19"
>

</span>
Expand All @@ -311,7 +340,7 @@ exports[`Storyshots Input Placeholder 1`] = `
className="light storyWrapper-0-1-2"
>
<input
className="ant-input container-0-1-8 container-d1-0-1-12"
className="ant-input container-0-1-12 container-d1-0-1-16"
data-test="input"
disabled={false}
onBlur={[Function]}
Expand Down Expand Up @@ -369,7 +398,7 @@ exports[`Storyshots Link Href 1`] = `
</div>
`;

exports[`Storyshots Notification Default 1`] = `
exports[`Storyshots Notification Error 1`] = `
<div
className="light storyWrapper-0-1-2"
>
Expand All @@ -381,7 +410,61 @@ exports[`Storyshots Notification Default 1`] = `
type="button"
>
<span>
Click
Error
</span>
</button>
</div>
`;

exports[`Storyshots Notification Info 1`] = `
<div
className="light storyWrapper-0-1-2"
>
<button
className="ant-btn ant-btn-default"
data-test="button"
disabled={false}
onClick={[Function]}
type="button"
>
<span>
Info
</span>
</button>
</div>
`;

exports[`Storyshots Notification Success 1`] = `
<div
className="light storyWrapper-0-1-2"
>
<button
className="ant-btn ant-btn-default"
data-test="button"
disabled={false}
onClick={[Function]}
type="button"
>
<span>
Success
</span>
</button>
</div>
`;

exports[`Storyshots Notification Warning 1`] = `
<div
className="light storyWrapper-0-1-2"
>
<button
className="ant-btn ant-btn-default"
data-test="button"
disabled={false}
onClick={[Function]}
type="button"
>
<span>
Warning
</span>
</button>
</div>
Expand Down Expand Up @@ -611,31 +694,31 @@ exports[`Storyshots Radio Group Loading 1`] = `
className="light storyWrapper-0-1-2"
>
<div
className="container-0-1-19"
className="container-0-1-23"
>
<div
className="skeletonButton-0-1-21"
className="skeletonButton-0-1-25"
>
<span
className="container-0-1-3 container-d2-0-1-22 skeleton-0-1-20"
className="container-0-1-3 container-d2-0-1-26 skeleton-0-1-24"
>

</span>
</div>
<div
className="skeletonButton-0-1-21"
className="skeletonButton-0-1-25"
>
<span
className="container-0-1-3 container-d3-0-1-23 skeleton-0-1-20"
className="container-0-1-3 container-d3-0-1-27 skeleton-0-1-24"
>

</span>
</div>
<div
className="skeletonButton-0-1-21"
className="skeletonButton-0-1-25"
>
<span
className="container-0-1-3 container-d4-0-1-24 skeleton-0-1-20"
className="container-0-1-3 container-d4-0-1-28 skeleton-0-1-24"
>

</span>
Expand Down Expand Up @@ -738,10 +821,10 @@ exports[`Storyshots Select Default 1`] = `
className="light storyWrapper-0-1-2"
>
<div
className="container-0-1-26 container-d0-0-1-30"
className="container-0-1-30 container-d0-0-1-34"
>
<div
className="ant-select dropdown-0-1-27 ant-select-single ant-select-show-arrow"
className="ant-select dropdown-0-1-31 ant-select-single ant-select-show-arrow"
data-test="select"
onBlur={[Function]}
onFocus={[Function]}
Expand Down Expand Up @@ -834,10 +917,10 @@ exports[`Storyshots Select Full Width 1`] = `
className="light storyWrapper-0-1-2"
>
<div
className="container-0-1-26 container-d2-0-1-32"
className="container-0-1-30 container-d2-0-1-36"
>
<div
className="ant-select dropdown-0-1-27 ant-select-single ant-select-show-arrow"
className="ant-select dropdown-0-1-31 ant-select-single ant-select-show-arrow"
data-test="select"
onBlur={[Function]}
onFocus={[Function]}
Expand Down Expand Up @@ -884,7 +967,7 @@ exports[`Storyshots Select Full Width 1`] = `
className="ant-select-selection-item"
>
<div
className="option-0-1-29"
className="option-0-1-33"
>
<span>
Lorem
Expand Down Expand Up @@ -935,10 +1018,10 @@ exports[`Storyshots Select Icon 1`] = `
className="light storyWrapper-0-1-2"
>
<div
className="container-0-1-26 container-d1-0-1-31"
className="container-0-1-30 container-d1-0-1-35"
>
<div
className="ant-select dropdown-0-1-27 ant-select-single ant-select-show-arrow"
className="ant-select dropdown-0-1-31 ant-select-single ant-select-show-arrow"
data-test="select"
onBlur={[Function]}
onFocus={[Function]}
Expand Down Expand Up @@ -985,10 +1068,10 @@ exports[`Storyshots Select Icon 1`] = `
className="ant-select-selection-item"
>
<div
className="option-0-1-29"
className="option-0-1-33"
>
<span
className="icon-0-1-28"
className="icon-0-1-32"
>
<svg
className=""
Expand Down Expand Up @@ -1048,10 +1131,10 @@ exports[`Storyshots Select Search 1`] = `
className="light storyWrapper-0-1-2"
>
<div
className="container-0-1-26 container-d3-0-1-33"
className="container-0-1-30 container-d3-0-1-37"
>
<div
className="ant-select dropdown-0-1-27 ant-select-single ant-select-show-arrow ant-select-show-search"
className="ant-select dropdown-0-1-31 ant-select-single ant-select-show-arrow ant-select-show-search"
data-test="select"
onBlur={[Function]}
onFocus={[Function]}
Expand Down Expand Up @@ -1144,7 +1227,7 @@ exports[`Storyshots Skeleton Circle 1`] = `
className="light storyWrapper-0-1-2"
>
<span
className="container-0-1-3 container-d6-0-1-35"
className="container-0-1-3 container-d6-0-1-39"
>

</span>
Expand All @@ -1156,27 +1239,27 @@ exports[`Storyshots Skeleton Count 1`] = `
className="light storyWrapper-0-1-2"
>
<span
className="container-0-1-3 container-d7-0-1-36"
className="container-0-1-3 container-d7-0-1-40"
>

</span>
<span
className="container-0-1-3 container-d7-0-1-36"
className="container-0-1-3 container-d7-0-1-40"
>

</span>
<span
className="container-0-1-3 container-d7-0-1-36"
className="container-0-1-3 container-d7-0-1-40"
>

</span>
<span
className="container-0-1-3 container-d7-0-1-36"
className="container-0-1-3 container-d7-0-1-40"
>

</span>
<span
className="container-0-1-3 container-d7-0-1-36"
className="container-0-1-3 container-d7-0-1-40"
>

</span>
Expand All @@ -1188,7 +1271,7 @@ exports[`Storyshots Skeleton Default 1`] = `
className="light storyWrapper-0-1-2"
>
<span
className="container-0-1-3 container-d5-0-1-34"
className="container-0-1-3 container-d5-0-1-38"
>

</span>
Expand Down
Loading