diff --git a/packages/carbon-web-components/src/components/link/link.ts b/packages/carbon-web-components/src/components/link/link.ts index eb1c32b2333..bac86923f10 100644 --- a/packages/carbon-web-components/src/components/link/link.ts +++ b/packages/carbon-web-components/src/components/link/link.ts @@ -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. @@ -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.