Skip to content

Commit

Permalink
refactor(cc-icon)!: refactor IconModel interface to `common.types.d…
Browse files Browse the repository at this point in the history
….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.
  • Loading branch information
roberttran-cc committed Jun 26, 2023
1 parent 95d4187 commit 89a6409
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/components/cc-button/cc-button.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/

/**
Expand Down
2 changes: 1 addition & 1 deletion src/components/cc-icon/cc-icon.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/

Expand Down
4 changes: 0 additions & 4 deletions src/components/cc-icon/cc-icon.types.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1 @@
interface IconModel {
content: string;
}

type IconSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
4 changes: 4 additions & 0 deletions src/components/common.types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ interface Variable {
value: string;
}

export interface IconModel {
content: string;
}

interface InvoiceAmount {
amount: Number;
currency: string;
Expand Down

0 comments on commit 89a6409

Please sign in to comment.