@popsure/dirty-swan 0.41.5 → 0.41.6
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/dist/cjs/index.js +4 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/lib/components/input/currency/index.d.ts +7 -6
- package/dist/cjs/lib/components/input/currency/input.stories.d.ts +83 -0
- package/dist/cjs/lib/index.d.ts +1 -1
- package/dist/esm/components/input/currency/index.js +5 -2
- package/dist/esm/components/input/currency/index.js.map +1 -1
- package/dist/esm/components/input/currency/index.test.js +1 -1
- package/dist/esm/components/input/currency/index.test.js.map +1 -1
- package/dist/esm/components/input/currency/input.stories.js +32 -0
- package/dist/esm/components/input/currency/input.stories.js.map +1 -0
- package/dist/esm/components/input/input.stories.js +1 -55
- package/dist/esm/components/input/input.stories.js.map +1 -1
- package/dist/esm/config-56f12c98.js +57 -0
- package/dist/esm/config-56f12c98.js.map +1 -0
- package/dist/esm/index.js +1 -1
- package/dist/esm/lib/components/input/currency/index.d.ts +7 -6
- package/dist/esm/lib/components/input/currency/input.stories.d.ts +83 -0
- package/dist/esm/lib/index.d.ts +1 -1
- package/package.json +1 -1
- package/src/lib/components/input/currency/index.test.tsx +1 -1
- package/src/lib/components/input/currency/index.tsx +11 -7
- package/src/lib/components/input/currency/input.stories.tsx +48 -0
- package/src/lib/index.tsx +1 -1
- package/src/lib/components/input/currency/index.stories.mdx +0 -33
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { Meta, Preview } from '@storybook/addon-docs/blocks';
|
|
2
|
-
|
|
3
|
-
import CurrencyInput from '.';
|
|
4
|
-
|
|
5
|
-
<Meta title="JSX/Inputs/Currency Input" />
|
|
6
|
-
|
|
7
|
-
# Currency Input
|
|
8
|
-
|
|
9
|
-
Currency input is a component built on top of the [Input](?path=/story/jsx-inputs-intro--page) component that give you a better formatting when numerical currency values.
|
|
10
|
-
|
|
11
|
-
The following will be done:
|
|
12
|
-
|
|
13
|
-
- Adding a Euro sign (€) prefix.
|
|
14
|
-
- Formatting thousand separators with a space as user type in.
|
|
15
|
-
- Setting decimal reparator as a dot (.)
|
|
16
|
-
|
|
17
|
-
<Preview>
|
|
18
|
-
<>
|
|
19
|
-
<h1 className="p-h1">Currency Input</h1>
|
|
20
|
-
<h4 className="p-h4 mt24">Empty</h4>
|
|
21
|
-
<CurrencyInput className="wmx5 mt8" />
|
|
22
|
-
<h4 className="p-h4 mt24">Filled</h4>
|
|
23
|
-
<CurrencyInput className="wmx5 mt8" value={1234567.32} />
|
|
24
|
-
<h4 className="p-h4 mt24">With placeholder</h4>
|
|
25
|
-
<CurrencyInput className="wmx5 mt8" placeholder="Amount" />
|
|
26
|
-
<h4 className="p-h4 mt24">With label</h4>
|
|
27
|
-
<CurrencyInput className="wmx5 mt8" label="Amount" placeholder="100" />
|
|
28
|
-
<h4 className="p-h4 mt24">With label and no placeholder</h4>
|
|
29
|
-
<CurrencyInput className="wmx5 mt8" label="Amount" />
|
|
30
|
-
<h4 className="p-h4 mt24">With placeholder and no label</h4>
|
|
31
|
-
<CurrencyInput className="wmx5 mt8" hideLabel label="Amount" placeholder="0" />
|
|
32
|
-
</>
|
|
33
|
-
</Preview>
|