Skip to content

Commit 068cd2b

Browse files
committed
Removed Annual Text Parameter
1 parent 23a00d9 commit 068cd2b

2 files changed

Lines changed: 1 addition & 17 deletions

File tree

packages/web-components/src/components/notice-choice/__stories__/notice-choice.stories.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,7 @@ const props = () => {
126126
'false'
127127
),
128128
environment: select('Environment', environment, 'stage'),
129-
email: text('Email', ''),
130-
isAnnual: select('Is Annual', isAnnualText, 'false'),
129+
email: text('Email', '')
131130
};
132131
};
133132

@@ -146,7 +145,6 @@ export const Default = (args) => {
146145
ncEmailDetail,
147146
environment,
148147
email,
149-
isAnnual,
150148
} = args?.NoticeChoice ?? {};
151149
return html`
152150
<c4d-notice-choice
@@ -163,7 +161,6 @@ export const Default = (args) => {
163161
.nc-tele-detail="${ncTeleDetail}"
164162
.nc-email-detail="${ncEmailDetail}"
165163
environment="${environment}"
166-
is-annual="${isAnnual}"
167164
@c4d-notice-choice-change=${onChange}
168165
@c4d-notice-choice-blur=${emailChanged}</c4d-notice-choice>
169166
`;

packages/web-components/src/components/notice-choice/notice-choice.ts

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ import styles from './notice-choice.scss';
2121
import { unsafeHTML } from 'lit/directives/unsafe-html.js';
2222
import { carbonElement as customElement } from '@carbon/web-components/es/globals/decorators/carbon-element.js';
2323
import '@carbon/web-components/es/components/skeleton-text/index.js';
24-
import { boolean } from '@storybook/addon-knobs';
2524

2625
const { prefix, stablePrefix: c4dPrefix } = settings;
2726

@@ -78,8 +77,6 @@ class NoticeChoice extends StableSelectorMixin(LitElement) {
7877
@property({ type: String, attribute: 'environment' })
7978
environment = 'prod';
8079

81-
@property({ type: boolean, attribute: 'is-annual', reflect: true })
82-
isAnnual = true;
8380
/**
8481
* End properties for passed attributes.
8582
*/
@@ -611,11 +608,6 @@ class NoticeChoice extends StableSelectorMixin(LitElement) {
611608
: content.annualText;
612609
}
613610

614-
if (this.isAnnual) {
615-
preText = content.combinedConsent;
616-
this.showCheckBox = true;
617-
}
618-
619611
// 2. country+state specific override
620612
const stateConfig = content.state?.[country];
621613
if (stateConfig) {
@@ -645,11 +637,6 @@ class NoticeChoice extends StableSelectorMixin(LitElement) {
645637
: this.isAnnualPeriodExpired
646638
? countryContent.combinedConsent
647639
: countryContent.annualText;
648-
649-
if (this.isAnnual) {
650-
preText = content.combinedConsent;
651-
this.showCheckBox = true;
652-
}
653640
}
654641

655642
// 4. permission/suppression logic

0 commit comments

Comments
 (0)