@commercetools-uikit/secondary-button 16.4.1 → 16.6.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/README.md +15 -14
- package/dist/commercetools-uikit-secondary-button.cjs.dev.js +25 -15
- package/dist/commercetools-uikit-secondary-button.cjs.prod.js +11 -2
- package/dist/commercetools-uikit-secondary-button.esm.js +25 -15
- package/dist/declarations/src/secondary-button.d.ts +2 -1
- package/dist/declarations/src/secondary-button.styles.d.ts +2 -1
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -20,20 +20,21 @@ import SecondaryButton from '@commercetools-uikit/secondary-button';
|
|
|
20
20
|
|
|
21
21
|
## Properties
|
|
22
22
|
|
|
23
|
-
| Props | Type | Required | Values | Default
|
|
24
|
-
| ------------------ | --------------------- | :------: | --------------------------- |
|
|
25
|
-
| `label` | `string` | ✅ | - | -
|
|
26
|
-
| `iconLeft` | `node` | ✅ | - | -
|
|
27
|
-
| `isToggleButton` | `bool` | ✅ | - | `false`
|
|
28
|
-
| `isToggled` | `bool` | - | - | -
|
|
29
|
-
| `theme` | `string` | - | `default`, `info` | `default`
|
|
30
|
-
| `
|
|
31
|
-
| `
|
|
32
|
-
| `
|
|
33
|
-
| `
|
|
34
|
-
| `
|
|
35
|
-
| `
|
|
36
|
-
| `
|
|
23
|
+
| Props | Type | Required | Values | Default | Description |
|
|
24
|
+
| ------------------ | --------------------- | :------: | --------------------------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
25
|
+
| `label` | `string` | ✅ | - | - | Should describe what the button does, for accessibility purposes (screen-reader users) |
|
|
26
|
+
| `iconLeft` | `node` | ✅ | - | - | The left icon displayed within the button |
|
|
27
|
+
| `isToggleButton` | `bool` | ✅ | - | `false` | If this is active, it means the button will persist in an "active" state when toggled (see `isToggled`), and back to normal state when untoggled |
|
|
28
|
+
| `isToggled` | `bool` | - | - | - | Tells when the button should present a toggled state. It does not have any effect when `isToggleButton` is false |
|
|
29
|
+
| `theme` | `string` | - | `default`, `info` | `default` | The component may have a theme only if `isToggleButton` is true. 
This property has been **deprecated** in favor of `tone`. |
|
|
30
|
+
| `tone` | `string` | - | `secondary`, `info` | `secondary` | Indicates the color scheme of the button |
|
|
31
|
+
| `size` | `string` | - | `'medium' , 'big'` | `'big'` | Indicates the size of the button. |
|
|
32
|
+
| `isDisabled` | `bool` | - | - | - | Tells when the button should present a disabled state |
|
|
33
|
+
| `buttonAttributes` | `object` | - | - | - | Allows setting custom attributes on the underlying button html element |
|
|
34
|
+
| `type` | `string` | - | `submit`, `reset`, `button` | `button` | Used as the HTML `type` attribute. |
|
|
35
|
+
| `onClick` | `func` | | - | - | What the button will trigger when clicked |
|
|
36
|
+
| `to` | `string` or `object` | - | - | - | Where the button should redirect when clicked |
|
|
37
|
+
| `as` | `string` or `element` | - | - | - | You may pass in a string like "a" to have the button render as an anchor tag instead. Or you could pass in a React Component, like a `Link`. |
|
|
37
38
|
|
|
38
39
|
The component further forwards all valid HTML attributes to the underlying `button` component.
|
|
39
40
|
|