Skip to content

Commit

Permalink
leverage ValuesOf type helper
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisdholt committed Jan 11, 2023
1 parent 4a20b5a commit 2c65bd2
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions packages/web-components/src/text/text.options.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { ValuesOf } from '@microsoft/fast-foundation';

/**
* TextSize constants
* @public
Expand All @@ -20,7 +22,7 @@ export const TextSize = {
* The font size and line height based on the theme tokens
* @public
*/
export type TextSize = typeof TextSize[keyof typeof TextSize];
export type TextSize = ValuesOf<typeof TextSize>;

/**
* TextFont Constants
Expand All @@ -36,7 +38,7 @@ export const TextFont = {
* Applies font family to the content
* @public
*/
export type TextFont = typeof TextFont[keyof typeof TextFont];
export type TextFont = ValuesOf<typeof TextFont>;

/**
* TextWeight Constants
Expand All @@ -53,7 +55,7 @@ export const TextWeight = {
* Applies font weight to the content
* @public
*/
export type TextWeight = typeof TextWeight[keyof typeof TextWeight];
export type TextWeight = ValuesOf<typeof TextWeight>;

/**
* TextAlign Constants
Expand All @@ -70,4 +72,4 @@ export const TextAlign = {
* Aligns the content
* @public
*/
export type TextAlign = typeof TextAlign[keyof typeof TextAlign];
export type TextAlign = ValuesOf<typeof TextAlign>;

0 comments on commit 2c65bd2

Please sign in to comment.