diff --git a/src/components.d.ts b/src/components.d.ts index cb168908d..f5c0e9da3 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -10,7 +10,7 @@ export namespace Components { /** * Identifier of the theme based on which the button is styled. */ - "color": "primary" | "secondary" | "danger" | "link" | "text"; + "color": string; /** * Disables the button on the interface. If the attribute’s value is undefined, the value is set to false. */ @@ -26,11 +26,11 @@ export namespace Components { /** * Size of the button. */ - "size": "normal" | "mini" | "small"; + "size": string; /** * Button type based on which actions are performed when the button is clicked. */ - "type": "button" | "reset" | "submit"; + "type": string; } interface FwCheckbox { /** @@ -702,7 +702,7 @@ declare namespace LocalJSX { /** * Identifier of the theme based on which the button is styled. */ - "color"?: "primary" | "secondary" | "danger" | "link" | "text"; + "color"?: string; /** * Disables the button on the interface. If the attribute’s value is undefined, the value is set to false. */ @@ -730,11 +730,11 @@ declare namespace LocalJSX { /** * Size of the button. */ - "size"?: "normal" | "mini" | "small"; + "size"?: string; /** * Button type based on which actions are performed when the button is clicked. */ - "type"?: "button" | "reset" | "submit"; + "type"?: string; } interface FwCheckbox { /** diff --git a/src/components/button/button.tsx b/src/components/button/button.tsx index 108b0e357..c3017387f 100644 --- a/src/components/button/button.tsx +++ b/src/components/button/button.tsx @@ -9,12 +9,12 @@ export class Button { /** * Button type based on which actions are performed when the button is clicked. */ - @Prop() type: 'button' | 'reset' | 'submit' = 'button'; + @Prop() type = 'button'; // 'button' | 'reset' | 'submit' /** * Identifier of the theme based on which the button is styled. */ - @Prop() color: 'primary' | 'secondary' | 'danger' | 'link' | 'text' = 'primary'; + @Prop() color = 'primary'; // 'primary' | 'secondary' | 'danger' | 'link' | 'text' /** * Disables the button on the interface. If the attribute’s value is undefined, the value is set to false. @@ -29,7 +29,7 @@ export class Button { /** * Size of the button. */ - @Prop() size: 'normal' | 'mini' | 'small' = 'normal'; + @Prop() size = 'normal'; // 'normal' | 'mini' | 'small' /** * Accepts the id of the fw-modal component to open it on click diff --git a/src/components/button/readme.md b/src/components/button/readme.md index d94d25da4..cbf1b4aae 100644 --- a/src/components/button/readme.md +++ b/src/components/button/readme.md @@ -43,14 +43,14 @@ fw-button displays a button on the user interface and enables performing specifi ## Properties -| Property | Attribute | Description | Type | Default | -| ---------------- | ------------------ | -------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------- | ----------- | -| `color` | `color` | Identifier of the theme based on which the button is styled. | `"danger" or "link" or "primary" or "secondary" or "text"` | `'primary'` | -| `disabled` | `disabled` | Disables the button on the interface. If the attribute’s value is undefined, the value is set to false. | `boolean` | `false` | -| `expand` | `expand` | Sets the button to a full-width block. If the attribute’s value is undefined, the value is set to false. | `boolean` | `false` | -| `modalTriggerId` | `modal-trigger-id` | Accepts the id of the fw-modal component to open it on click | `string` | `''` | -| `size` | `size` | Size of the button. | `"mini" or "normal" or "small"` | `'normal'` | -| `type` | `type` | Button type based on which actions are performed when the button is clicked. | `"button" or "reset" or "submit"` | `'button'` | +| Property | Attribute | Description | Type | Default | +| ---------------- | ------------------ | -------------------------------------------------------------------------------------------------------- | --------- | ----------- | +| `color` | `color` | Identifier of the theme based on which the button is styled. | `string` | `'primary'` | +| `disabled` | `disabled` | Disables the button on the interface. If the attribute’s value is undefined, the value is set to false. | `boolean` | `false` | +| `expand` | `expand` | Sets the button to a full-width block. If the attribute’s value is undefined, the value is set to false. | `boolean` | `false` | +| `modalTriggerId` | `modal-trigger-id` | Accepts the id of the fw-modal component to open it on click | `string` | `''` | +| `size` | `size` | Size of the button. | `string` | `'normal'` | +| `type` | `type` | Button type based on which actions are performed when the button is clicked. | `string` | `'button'` | ## Events