@faststore/ui 1.3.18 → 1.3.19
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/PaymentMethods/PaymentMethods.d.ts +26 -0
- package/dist/molecules/PaymentMethods/index.d.ts +2 -0
- package/dist/molecules/PaymentMethods/stories/PaymentMethods.stories.d.ts +4 -0
- package/dist/molecules/PaymentMethods/stories/assets/Icons.d.ts +9 -0
- package/dist/ui.cjs.development.js +21 -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 +21 -1
- package/dist/ui.esm.js.map +1 -1
- package/package.json +3 -3
- package/src/index.ts +3 -0
- package/src/molecules/PaymentMethods/PaymentMethods.test.tsx +37 -0
- package/src/molecules/PaymentMethods/PaymentMethods.tsx +58 -0
- package/src/molecules/PaymentMethods/index.tsx +2 -0
- package/src/molecules/PaymentMethods/stories/PaymentMethods.mdx +19 -0
- package/src/molecules/PaymentMethods/stories/PaymentMethods.stories.tsx +41 -0
- package/src/molecules/PaymentMethods/stories/assets/Icons.tsx +89 -0
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Story, Canvas, ArgsTable } from '@storybook/addon-docs'
|
|
2
|
+
import PaymentMethods from '../PaymentMethods'
|
|
3
|
+
|
|
4
|
+
# PaymentMethods
|
|
5
|
+
|
|
6
|
+
<Canvas>
|
|
7
|
+
<Story id="molecules-paymentmethods--payment-methods" />
|
|
8
|
+
</Canvas>
|
|
9
|
+
|
|
10
|
+
## Props
|
|
11
|
+
|
|
12
|
+
<ArgsTable of={PaymentMethods} />
|
|
13
|
+
|
|
14
|
+
## CSS Selectors
|
|
15
|
+
|
|
16
|
+
```css
|
|
17
|
+
[data-store-payment-methods] {}
|
|
18
|
+
[data-payment-methods-flags] {}
|
|
19
|
+
```
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { Story, Meta } from '@storybook/react'
|
|
2
|
+
import React from 'react'
|
|
3
|
+
|
|
4
|
+
import type { PaymentMethodsProps } from '../PaymentMethods'
|
|
5
|
+
import Component from '../PaymentMethods'
|
|
6
|
+
import mdx from './PaymentMethods.mdx'
|
|
7
|
+
import {
|
|
8
|
+
VisaCard,
|
|
9
|
+
MasterCard,
|
|
10
|
+
MaestroCard,
|
|
11
|
+
AmericanExpressCard,
|
|
12
|
+
HiperCard,
|
|
13
|
+
EloCard,
|
|
14
|
+
DinersClub,
|
|
15
|
+
PayPal,
|
|
16
|
+
} from './assets/Icons'
|
|
17
|
+
|
|
18
|
+
const PaymentMethodsTemplate: Story<PaymentMethodsProps> = ({ testId }) => (
|
|
19
|
+
<Component testId={testId} title="Payment Methods">
|
|
20
|
+
<VisaCard key="visa" />
|
|
21
|
+
<MasterCard key="mastercard" />
|
|
22
|
+
<MaestroCard key="maestro" />
|
|
23
|
+
<AmericanExpressCard key="american express" />
|
|
24
|
+
<HiperCard key="hipercard" />
|
|
25
|
+
<EloCard key="elo" />
|
|
26
|
+
<DinersClub key="diners club" />
|
|
27
|
+
<PayPal key="paypal" />
|
|
28
|
+
</Component>
|
|
29
|
+
)
|
|
30
|
+
|
|
31
|
+
export const PaymentMethods = PaymentMethodsTemplate.bind({})
|
|
32
|
+
PaymentMethods.storyName = 'PaymentMethods'
|
|
33
|
+
|
|
34
|
+
export default {
|
|
35
|
+
title: 'Molecules/PaymentMethods',
|
|
36
|
+
parameters: {
|
|
37
|
+
docs: {
|
|
38
|
+
page: mdx,
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
} as Meta
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
|
|
3
|
+
export function VisaCard() {
|
|
4
|
+
return (
|
|
5
|
+
<img
|
|
6
|
+
alt="Visa logo"
|
|
7
|
+
width={50}
|
|
8
|
+
height={50}
|
|
9
|
+
src="https://seeklogo.com/images/V/visa-logo-BDDD51C62D-seeklogo.com.png"
|
|
10
|
+
/>
|
|
11
|
+
)
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export function MasterCard() {
|
|
15
|
+
return (
|
|
16
|
+
<img
|
|
17
|
+
alt="Mastercard logo"
|
|
18
|
+
width={50}
|
|
19
|
+
height={50}
|
|
20
|
+
src="https://upload.wikimedia.org/wikipedia/commons/thumb/2/2a/Mastercard-logo.svg/1544px-Mastercard-logo.svg.png"
|
|
21
|
+
/>
|
|
22
|
+
)
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export function AmericanExpressCard() {
|
|
26
|
+
return (
|
|
27
|
+
<img
|
|
28
|
+
alt="American express logo"
|
|
29
|
+
width={50}
|
|
30
|
+
height={50}
|
|
31
|
+
src="https://seeklogo.com/images/A/american-express-logo-EDF87C04A0-seeklogo.com.png"
|
|
32
|
+
/>
|
|
33
|
+
)
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export function MaestroCard() {
|
|
37
|
+
return (
|
|
38
|
+
<img
|
|
39
|
+
alt="American express logo"
|
|
40
|
+
width={50}
|
|
41
|
+
height={50}
|
|
42
|
+
src="https://seeklogo.com/images/M/Maestro-logo-BF4E5E7686-seeklogo.com.png"
|
|
43
|
+
/>
|
|
44
|
+
)
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export function EloCard() {
|
|
48
|
+
return (
|
|
49
|
+
<img
|
|
50
|
+
alt="Elo logo"
|
|
51
|
+
width={50}
|
|
52
|
+
height={50}
|
|
53
|
+
src="https://seeklogo.com/images/E/elo-logo-9F0CF48D54-seeklogo.com.png"
|
|
54
|
+
/>
|
|
55
|
+
)
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export function HiperCard() {
|
|
59
|
+
return (
|
|
60
|
+
<img
|
|
61
|
+
alt="Hipercard logo"
|
|
62
|
+
width={50}
|
|
63
|
+
height={50}
|
|
64
|
+
src="https://seeklogo.com/images/H/Hipercard-logo-139D91D263-seeklogo.com.png"
|
|
65
|
+
/>
|
|
66
|
+
)
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export function PayPal() {
|
|
70
|
+
return (
|
|
71
|
+
<img
|
|
72
|
+
alt="PayPal brand"
|
|
73
|
+
width={50}
|
|
74
|
+
height={50}
|
|
75
|
+
src="https://seeklogo.com/images/P/paypal-logo-484B6FE744-seeklogo.com.png"
|
|
76
|
+
/>
|
|
77
|
+
)
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export function DinersClub() {
|
|
81
|
+
return (
|
|
82
|
+
<img
|
|
83
|
+
alt="Diners club logo"
|
|
84
|
+
width={50}
|
|
85
|
+
height={50}
|
|
86
|
+
src="https://seeklogo.com/images/D/Diners_Club_International-logo-EF50D35BE8-seeklogo.com.png"
|
|
87
|
+
/>
|
|
88
|
+
)
|
|
89
|
+
}
|