@1024pix/pix-ui 31.0.0 → 31.1.0
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
CHANGED
|
@@ -28,6 +28,7 @@ export const Template = (args) => {
|
|
|
28
28
|
@errorMessage={{this.errorMessage}}
|
|
29
29
|
@isDisabled={{this.isDisabled}}
|
|
30
30
|
@placement={{this.placement}}
|
|
31
|
+
@icon={{this.icon}}
|
|
31
32
|
/>
|
|
32
33
|
`,
|
|
33
34
|
context: args,
|
|
@@ -218,6 +219,19 @@ WithDropDownAtTheTop.args = {
|
|
|
218
219
|
placement: 'top',
|
|
219
220
|
};
|
|
220
221
|
|
|
222
|
+
export const WithIcon = Template.bind({});
|
|
223
|
+
WithIcon.args = {
|
|
224
|
+
icon: 'earth-europe',
|
|
225
|
+
isSearchable: false,
|
|
226
|
+
label: 'With icon',
|
|
227
|
+
onChange: action('onChange'),
|
|
228
|
+
options: [
|
|
229
|
+
{ value: 'en', label: 'English' },
|
|
230
|
+
{ value: 'fr', label: 'Français' },
|
|
231
|
+
],
|
|
232
|
+
value: 'fr',
|
|
233
|
+
};
|
|
234
|
+
|
|
221
235
|
export const argTypes = {
|
|
222
236
|
options: {
|
|
223
237
|
name: 'options',
|
|
@@ -374,4 +388,14 @@ export const argTypes = {
|
|
|
374
388
|
defaultValue: { summary: null },
|
|
375
389
|
},
|
|
376
390
|
},
|
|
391
|
+
icon: {
|
|
392
|
+
name: 'icon',
|
|
393
|
+
description:
|
|
394
|
+
"Permet l'affichage d'une icône FontAwesome avant le placeholder ou le label de l'option sélectionnée.",
|
|
395
|
+
type: { name: 'string', required: false },
|
|
396
|
+
table: {
|
|
397
|
+
type: { summary: 'string' },
|
|
398
|
+
defaultValue: { summary: null },
|
|
399
|
+
},
|
|
400
|
+
},
|
|
377
401
|
};
|
|
@@ -61,6 +61,12 @@ Ici nous avons forcé le placement de la dropdown en haut du select mais sachez
|
|
|
61
61
|
<Story name="WithDropDownAtTheTop" story={stories.WithDropDownAtTheTop} />
|
|
62
62
|
</Canvas>
|
|
63
63
|
|
|
64
|
+
## WithIcon
|
|
65
|
+
|
|
66
|
+
<Canvas>
|
|
67
|
+
<Story name="WithIcon" story={stories.WithIcon} />
|
|
68
|
+
</Canvas>
|
|
69
|
+
|
|
64
70
|
## Usage
|
|
65
71
|
|
|
66
72
|
```html
|
|
@@ -80,6 +86,7 @@ Ici nous avons forcé le placement de la dropdown en haut du select mais sachez
|
|
|
80
86
|
@requiredText="{{requiredText}}"
|
|
81
87
|
@errorMessage="{{errorMessage}}"
|
|
82
88
|
@placement="{{placement}}"
|
|
89
|
+
@icon="{{icon}}"
|
|
83
90
|
/>
|
|
84
91
|
```
|
|
85
92
|
|