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.
@@ -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({});
@@ -6,6 +6,9 @@ export default {
6
6
  component: PillComponent,
7
7
  };
8
8
 
9
- const Template = (args) => <PillComponent {...args}>Pill component</PillComponent>;
9
+ const Template = (args) => {
10
+ <PillComponent {...args} />
11
+
12
+ };
10
13
 
11
14
  export const Default = Template.bind({});