From 4357099f70e20503d481371bd0670b15777e0bd2 Mon Sep 17 00:00:00 2001 From: verena-ifx Date: Thu, 29 Jun 2023 11:05:17 +0200 Subject: [PATCH] global.css re-added, radio button sizes added --- .../stencil-components/vanilla-cdn/index.html | 3 +-- packages/components-vue/lib/components.ts | 1 + .../components/radio-button/radio-button.scss | 26 +++++++++++++------ .../radio-button/radio-button.stories.ts | 15 ++++++----- .../components/radio-button/radio-button.tsx | 3 ++- .../src/components/radio-button/readme.md | 11 ++++---- packages/components/stencil.config.ts | 1 + 7 files changed, 38 insertions(+), 22 deletions(-) diff --git a/examples/stencil-components/vanilla-cdn/index.html b/examples/stencil-components/vanilla-cdn/index.html index 44fb4ee318..083fad15ce 100644 --- a/examples/stencil-components/vanilla-cdn/index.html +++ b/examples/stencil-components/vanilla-cdn/index.html @@ -8,7 +8,6 @@ - Vanilla @@ -63,7 +62,7 @@

Text Input


Radio Button

- Text + Text diff --git a/packages/components-vue/lib/components.ts b/packages/components-vue/lib/components.ts index 0206c28b03..2a195d2edd 100644 --- a/packages/components-vue/lib/components.ts +++ b/packages/components-vue/lib/components.ts @@ -253,6 +253,7 @@ export const IfxRadioButton = /*@__PURE__*/ defineContainer { // Create the radio button element const element = document.createElement('ifx-radio-button'); @@ -30,6 +34,7 @@ const DefaultTemplate = (args) => { element.setAttribute('error', args.error); element.setAttribute('disabled', args.disabled); element.setAttribute('value', args.value); + element.setAttribute('size', args.size); // Added size prop // Add the label as a text node element.appendChild(document.createTextNode(args.label)); @@ -41,6 +46,4 @@ const DefaultTemplate = (args) => { return element; } - export const Default = DefaultTemplate.bind({}); - diff --git a/packages/components/src/components/radio-button/radio-button.tsx b/packages/components/src/components/radio-button/radio-button.tsx index 5d44318a94..94b2773968 100644 --- a/packages/components/src/components/radio-button/radio-button.tsx +++ b/packages/components/src/components/radio-button/radio-button.tsx @@ -11,6 +11,7 @@ export class RadioButton { @Prop() disabled: boolean = false; @Prop() value: boolean = false; @Prop() error: boolean = false; + @Prop() size: "s" | "m" = "s"; // New size prop @State() internalValue: boolean; @State() hasSlot: boolean = true; @@ -43,7 +44,7 @@ export class RadioButton { render() { return ( -
+