Skip to content

Commit

Permalink
fix(link-with-icon): refactor LINK_SIZE enum (#11071)
Browse files Browse the repository at this point in the history
* fix(link-with-icon): refactor LINK_SIZE enum

* fix(link-with-icon): export LINK_SIZE

* fix(link-with-icon): change union to object-to-type

* fix(link-with-icon): revert LINK_SIZE reference removals

* chore(release): publish

 - @carbon/[email protected]
 - @carbon/[email protected]
 - @carbon/[email protected]
 - @carbon/[email protected]
 - @carbon/[email protected]
 - @carbon/[email protected]
 - @carbon/[email protected]
 - @carbon/[email protected]
 - @carbon/[email protected]
 - @carbon/[email protected]
 - @carbon/[email protected]
 - @carbon/[email protected]

* Revert "chore(release): publish"

This reverts commit af5f295.

---------

Co-authored-by: ibmdotcom-bot <[email protected]>
  • Loading branch information
andy-blum and ibmdotcom-bot authored Nov 1, 2023
1 parent e2f863f commit cf570e1
Showing 1 changed file with 8 additions and 16 deletions.
24 changes: 8 additions & 16 deletions packages/carbon-web-components/src/components/link/link.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,22 +20,14 @@ const { prefix } = settings;
/**
* Link size.
*/
export enum LINK_SIZE {
/**
* Regular size
*/
REGULAR = '',

/**
* Small size.
*/
SMALL = 'sm',
export const LINK_SIZE = {
REGULAR: '',
SMALL: 'sm',
LARGE: 'lg',
};

/**
* Large size.
*/
LARGE = 'lg',
}
// Convert object key in a type
type LINK_SIZE_TYPE = (typeof LINK_SIZE)[keyof typeof LINK_SIZE];

/**
* Link.
Expand Down Expand Up @@ -190,7 +182,7 @@ class BXLink extends FocusMixin(LitElement) {
* Link size.
*/
@property({ reflect: true })
size = LINK_SIZE.REGULAR;
size: LINK_SIZE_TYPE = LINK_SIZE.REGULAR;

/**
* The link target.
Expand Down

0 comments on commit cf570e1

Please sign in to comment.