Skip to content

Commit

Permalink
More changes from self-review
Browse files Browse the repository at this point in the history
  • Loading branch information
xander-marjoram committed Jul 25, 2024
1 parent 972445c commit 194dda1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions packages/components/pie-cookie-banner/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -229,17 +229,16 @@ export class PieCookieBanner extends LitElement implements CookieBannerProps {
}

render () {
const leadingActionText = this._localiseText('preferencesManagement.cta.save.label');
return html`
<pie-modal
.isOpen="${this._isModalOpen}"
hasBackButton
hasStackedActions
isFullWidthBelowMid
heading="${this._localiseText('preferencesManagement.title')}"
leadingActionText="${leadingActionText}"
leadingActionText="${this._localiseText('preferencesManagement.cta.save.label')}"
leadingActionVariant="primary"
.aria=${{ leadingActionLabel: leadingActionText }}
.aria=${{ leadingActionLabel: this._localiseText('preferencesManagement.cta.save.ariaLabel') }}
@pie-modal-leading-action-click="${this._handlePreferencesSaved}"
@pie-modal-back="${this._displayCookieBanner}">
${this.renderModalContent()}
Expand Down
2 changes: 1 addition & 1 deletion packages/components/pie-modal/src/defs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ export const ON_MODAL_SUPPORTING_ACTION_CLICK = 'pie-modal-supporting-action-cli

export type ModalActionType = 'leading' | 'supporting';

export type DefaultProps = ComponentDefaultProps<ModalProps, keyof Omit<ModalProps, 'aria' | 'heading' | 'returnFocusAfterCloseSelector' | 'leadingActionText' | 'supportingActionText'>>;
export type DefaultProps = ComponentDefaultProps<ModalProps, keyof Omit<ModalProps, 'aria' | 'heading' | 'leadingActionText' | 'supportingActionText' | 'returnFocusAfterCloseSelector'>>;

export const defaultProps: DefaultProps = {
hasBackButton: false,
Expand Down

0 comments on commit 194dda1

Please sign in to comment.