From ca2d545bc58858270c6b565471ca902950c5efd8 Mon Sep 17 00:00:00 2001 From: verena-ifx Date: Mon, 11 Sep 2023 14:54:05 +0200 Subject: [PATCH 1/4] radio-button design review updates --- .../components/radio-button/radio-button.scss | 17 ++++++++++------- .../components/radio-button/radio-button.tsx | 9 ++++++--- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/packages/components/src/components/radio-button/radio-button.scss b/packages/components/src/components/radio-button/radio-button.scss index 79cc908a5e..b95f51713a 100644 --- a/packages/components/src/components/radio-button/radio-button.scss +++ b/packages/components/src/components/radio-button/radio-button.scss @@ -53,7 +53,7 @@ } &:hover { - border-color: #0A8276; + background-color: tokens.$ifxColorEngineering200; } &.disabled { @@ -90,10 +90,10 @@ &:hover { - border-color: #08665C; + border-color: tokens.$ifxColorOcean600; & .radioButton__wrapper-mark { - background-color: #08665C; + background-color: tokens.$ifxColorOcean600; } } @@ -124,7 +124,6 @@ .label { display: flex; align-items: center; - width: 25px; height: tokens.$ifxSize250; font-style: normal; font-weight: 400; @@ -135,13 +134,17 @@ order: 1; flex-grow: 0; + &.label-m { + height: tokens.$ifxSize300; + font-size: tokens.$ifxFontSizeM; + line-height: tokens.$ifxLineHeightM; + } + &.disabled { color: #BFBBBB; } - &.error { - color: #CD002F; - } + &:hover { cursor: pointer; diff --git a/packages/components/src/components/radio-button/radio-button.tsx b/packages/components/src/components/radio-button/radio-button.tsx index 5cdf641a22..2b2cde7adf 100644 --- a/packages/components/src/components/radio-button/radio-button.tsx +++ b/packages/components/src/components/radio-button/radio-button.tsx @@ -34,7 +34,7 @@ export class RadioButton { handleRadioButtonClick() { - if (!this.disabled) { + if (!this.disabled && !this.error) { this.internalValue = !this.internalValue; this.el.shadowRoot.querySelector('.radioButton__wrapper').focus(); this.ifxChange.emit(this.internalValue); @@ -48,13 +48,16 @@ export class RadioButton { onClick={this.handleRadioButtonClick.bind(this)} >
{this.internalValue &&
}
{this.hasSlot && ( -
+
)} From 1dd10d1561422328ae78a37ee5e051ebc1622d54 Mon Sep 17 00:00:00 2001 From: verena-ifx Date: Mon, 11 Sep 2023 15:15:52 +0200 Subject: [PATCH 2/4] e2e tests fixed --- .../src/components/radio-button/radio-button.e2e.ts | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/packages/components/src/components/radio-button/radio-button.e2e.ts b/packages/components/src/components/radio-button/radio-button.e2e.ts index 1d2bc17bd4..a6d678ea0e 100644 --- a/packages/components/src/components/radio-button/radio-button.e2e.ts +++ b/packages/components/src/components/radio-button/radio-button.e2e.ts @@ -12,17 +12,6 @@ describe('ifx-radio-button', () => { - it('renders changes to the error prop', async () => { - const page = await newE2EPage(); - await page.setContent('Error Test'); - const component = await page.find('ifx-radio-button'); - - component.setProperty('error', true); - await page.waitForChanges(); - const element = await page.find('ifx-radio-button >>> .label'); - expect(element).toHaveClass('error'); - }); - it('handleRadioButtonClick should emit ifxChange event if not disabled and not in error', async () => { From 55790c5432a6cbc3840c86f63353544100bbbd9e Mon Sep 17 00:00:00 2001 From: tishoyanchev Date: Mon, 11 Sep 2023 15:37:38 +0200 Subject: [PATCH 3/4] added font family --- .../components/src/components/radio-button/radio-button.scss | 1 + packages/components/src/index.html | 1 + 2 files changed, 2 insertions(+) diff --git a/packages/components/src/components/radio-button/radio-button.scss b/packages/components/src/components/radio-button/radio-button.scss index b95f51713a..89427668fd 100644 --- a/packages/components/src/components/radio-button/radio-button.scss +++ b/packages/components/src/components/radio-button/radio-button.scss @@ -1,4 +1,5 @@ @use "~@infineon/design-system-tokens/dist/tokens"; +@use "../../global/font.scss"; .radioButton__container { box-sizing: border-box; diff --git a/packages/components/src/index.html b/packages/components/src/index.html index 5bd2d52b0f..ac6135361b 100644 --- a/packages/components/src/index.html +++ b/packages/components/src/index.html @@ -21,6 +21,7 @@ + Text From 63ef51d777f935cbd1b709cfa3d4f48fa98ed58d Mon Sep 17 00:00:00 2001 From: tishoyanchev Date: Mon, 11 Sep 2023 15:38:15 +0200 Subject: [PATCH 4/4] cleaned index --- packages/components/src/index.html | 2 -- 1 file changed, 2 deletions(-) diff --git a/packages/components/src/index.html b/packages/components/src/index.html index ac6135361b..2fe54dc9b1 100644 --- a/packages/components/src/index.html +++ b/packages/components/src/index.html @@ -21,8 +21,6 @@ - Text - \ No newline at end of file