@faststore/ui 1.3.17 → 1.3.18
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/CHANGELOG.md +11 -0
- package/dist/index.d.ts +2 -0
- package/dist/molecules/Alert/Alert.d.ts +11 -0
- package/dist/molecules/Alert/index.d.ts +2 -0
- package/dist/molecules/Alert/stories/Alert.stories.d.ts +5 -0
- package/dist/ui.cjs.development.js +14 -0
- package/dist/ui.cjs.development.js.map +1 -1
- package/dist/ui.cjs.production.min.js +1 -1
- package/dist/ui.cjs.production.min.js.map +1 -1
- package/dist/ui.esm.js +14 -1
- package/dist/ui.esm.js.map +1 -1
- package/package.json +3 -3
- package/src/index.ts +3 -0
- package/src/molecules/Alert/Alert.test.tsx +23 -0
- package/src/molecules/Alert/Alert.tsx +30 -0
- package/src/molecules/Alert/index.ts +2 -0
- package/src/molecules/Alert/stories/Alert.mdx +26 -0
- package/src/molecules/Alert/stories/Alert.stories.tsx +36 -0
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { Meta, Story } from '@storybook/react'
|
|
2
|
+
import React from 'react'
|
|
3
|
+
|
|
4
|
+
import type { AlertProps } from '../Alert'
|
|
5
|
+
import Component from '../Alert'
|
|
6
|
+
import ShoppingCartIcon from '../../../atoms/Icon/stories/assets/ShoppingCart'
|
|
7
|
+
import mdx from './Alert.mdx'
|
|
8
|
+
import { Icon } from '../../..'
|
|
9
|
+
|
|
10
|
+
const AlertTemplate: Story<AlertProps> = ({ children }) => (
|
|
11
|
+
<Component>{children}</Component>
|
|
12
|
+
)
|
|
13
|
+
|
|
14
|
+
export const Alert = AlertTemplate.bind({})
|
|
15
|
+
Alert.args = {
|
|
16
|
+
children: 'Alert',
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export const AlertWithIcon = AlertTemplate.bind({})
|
|
20
|
+
AlertWithIcon.args = {
|
|
21
|
+
children: (
|
|
22
|
+
<>
|
|
23
|
+
<Icon component={<ShoppingCartIcon />} />
|
|
24
|
+
<span>Alert</span>
|
|
25
|
+
</>
|
|
26
|
+
),
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export default {
|
|
30
|
+
title: 'Molecules/Alert',
|
|
31
|
+
parameters: {
|
|
32
|
+
docs: {
|
|
33
|
+
page: mdx,
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
} as Meta
|