groovinads-ui 1.2.55 → 1.2.58
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/README.md +179 -76
- package/dist/index.es.js +3 -3
- package/dist/index.js +3 -3
- package/package.json +1 -1
- package/src/components/Button/Button.jsx +13 -25
- package/src/components/Dropdowns/DropdownSimpleDatePicker.jsx +135 -137
- package/src/components/Dropdowns/DropdownsDatePicker/DropdownDatePicker.jsx +6 -6
- package/src/components/Inputs/InputChip.jsx +149 -0
- package/src/components/Inputs/index.js +2 -1
- package/src/stories/Button.stories.jsx +16 -4
- package/src/stories/DropdownDatePicker.stories.jsx +19 -2
- package/src/stories/DropdownSimpleDatePicker.stories.jsx +22 -19
- package/src/stories/InputChip.stories.jsx +46 -0
- package/src/stories/PillComponent.stories.jsx +4 -1
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
import InputChip from '../components/Inputs/InputChip';
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
title: 'Inputs/InputChip',
|
|
6
|
+
component: InputChip,
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
const Template = (args) => {
|
|
10
|
+
const [ keywordsList, setKeywordsList] = useState(['(0)keyword1', '(0)keyword2', '(0)keyword3']);
|
|
11
|
+
const nonRecomendedKeywords = ['keyword4', 'keyword5'];
|
|
12
|
+
|
|
13
|
+
const [ keywordList2, setKeywordsList2] = useState([]);
|
|
14
|
+
|
|
15
|
+
return (
|
|
16
|
+
<>
|
|
17
|
+
{/* HAY KEYWORDS */}
|
|
18
|
+
<InputChip
|
|
19
|
+
{...args}
|
|
20
|
+
className={'mb-3'}
|
|
21
|
+
placeholder={'Add keywords…'}
|
|
22
|
+
keywordsList={keywordsList}
|
|
23
|
+
setKeywordsList={setKeywordsList}
|
|
24
|
+
nonRecomendedKeywords={nonRecomendedKeywords}
|
|
25
|
+
maxKeywordLength={10}
|
|
26
|
+
recomendedKeywords={5}
|
|
27
|
+
requiredText='You can only add up to 15 keywords.'
|
|
28
|
+
maxKeywords={15}
|
|
29
|
+
counter={true}
|
|
30
|
+
/>
|
|
31
|
+
|
|
32
|
+
{/* NO HAY KEYWORDS */}
|
|
33
|
+
<InputChip
|
|
34
|
+
placeholder={'Add keywords…'}
|
|
35
|
+
keywordsList={keywordList2}
|
|
36
|
+
setKeywordsList={setKeywordsList2}
|
|
37
|
+
nonRecomendedKeywords={nonRecomendedKeywords}
|
|
38
|
+
maxKeywordLength={10}
|
|
39
|
+
maxKeywords={15}
|
|
40
|
+
requiredText='You can only add up to 15 keywords.'
|
|
41
|
+
counter={true}
|
|
42
|
+
/>
|
|
43
|
+
</>
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
export const Default = Template.bind({});
|