From 89a640982386a6aef1b80c1e2f08539f52687739 Mon Sep 17 00:00:00 2001 From: Robert Tran Date: Tue, 6 Jun 2023 10:20:50 +0200 Subject: [PATCH] refactor(cc-icon)!: refactor `IconModel` interface to `common.types.d.ts` BREAKING CHANGE: `IconModel` interface should be imported from `src/components/common.types.d.ts` file and not `src/components/cc-icon/cc-icon.types.d.ts` file anymore. --- src/components/cc-button/cc-button.js | 2 +- src/components/cc-icon/cc-icon.js | 2 +- src/components/cc-icon/cc-icon.types.d.ts | 4 ---- src/components/common.types.d.ts | 4 ++++ 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/components/cc-button/cc-button.js b/src/components/cc-button/cc-button.js index baec6687b..383b57723 100644 --- a/src/components/cc-button/cc-button.js +++ b/src/components/cc-button/cc-button.js @@ -8,7 +8,7 @@ import { skeletonStyles } from '../../styles/skeleton.js'; import { linkStyles } from '../../templates/cc-link/cc-link.js'; /** - * @typedef {import('../cc-icon/cc-icon.types.js').IconModel} IconModel + * @typedef {import('../common.types.js').IconModel} IconModel */ /** diff --git a/src/components/cc-icon/cc-icon.js b/src/components/cc-icon/cc-icon.js index 52b3e4d45..bf066ac82 100644 --- a/src/components/cc-icon/cc-icon.js +++ b/src/components/cc-icon/cc-icon.js @@ -3,7 +3,7 @@ import { unsafeSVG } from 'lit/directives/unsafe-svg.js'; import { skeletonStyles } from '../../styles/skeleton.js'; /** - * @typedef {import('./cc-icon.types.js').IconModel} IconModel + * @typedef {import('../common.types.js').IconModel} IconModel * @typedef {import('./cc-icon.types.js').IconSize} IconSize */ diff --git a/src/components/cc-icon/cc-icon.types.d.ts b/src/components/cc-icon/cc-icon.types.d.ts index 8c19db51a..153c09b34 100644 --- a/src/components/cc-icon/cc-icon.types.d.ts +++ b/src/components/cc-icon/cc-icon.types.d.ts @@ -1,5 +1 @@ -interface IconModel { - content: string; -} - type IconSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl'; diff --git a/src/components/common.types.d.ts b/src/components/common.types.d.ts index e02f66df5..c129b3daf 100644 --- a/src/components/common.types.d.ts +++ b/src/components/common.types.d.ts @@ -56,6 +56,10 @@ interface Variable { value: string; } +export interface IconModel { + content: string; +} + interface InvoiceAmount { amount: Number; currency: string;