Skip to content

Commit 3fe03b5

Browse files
Adds Size token (#1952)
* Adds `Size` token * lint * bump prettier version * lint fixes - prettier 2.8.8 --------- Co-authored-by: Brooke Scarlett Yalof <[email protected]>
1 parent fd90750 commit 3fe03b5

File tree

57 files changed

+103
-85
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+103
-85
lines changed

.changeset/afraid-snails-trade.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@leafygreen-ui/tokens': minor
3+
---
4+
5+
Adds `Size` token

.changeset/shy-houses-pump.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@lg-tools/lint': patch
3+
---
4+
5+
Bumps prettier version to 2.8.8

STYLEGUIDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ export const someConstant = {
5555
optionTwo = 'option 2',
5656
} as const;
5757

58-
export type someConstant = typeof someConstant[keyof typeof someConstant];
58+
export type someConstant = (typeof someConstant)[keyof typeof someConstant];
5959
```
6060

6161
#### Avoid

packages/badge/src/Badge/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,4 @@ export const Variant = {
2828
Green: 'green',
2929
} as const;
3030

31-
export type Variant = typeof Variant[keyof typeof Variant];
31+
export type Variant = (typeof Variant)[keyof typeof Variant];

packages/banner/src/Banner/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export const Variant = {
88
Success: 'success',
99
} as const;
1010

11-
export type Variant = typeof Variant[keyof typeof Variant];
11+
export type Variant = (typeof Variant)[keyof typeof Variant];
1212

1313
export interface BannerProps
1414
extends HTMLElementProps<'div', never>,

packages/button/src/types.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export const Variant = {
1111
BaseGreen: 'baseGreen',
1212
} as const;
1313

14-
export type Variant = typeof Variant[keyof typeof Variant];
14+
export type Variant = (typeof Variant)[keyof typeof Variant];
1515

1616
/**
1717
* Size variants
@@ -25,15 +25,15 @@ export const Size = {
2525
Large: 'large',
2626
};
2727

28-
export type Size = typeof Size[keyof typeof Size];
28+
export type Size = (typeof Size)[keyof typeof Size];
2929

3030
// TODO: Remove in next major release
3131
export const FontSize = {
3232
Body1: 13,
3333
Body2: 16,
3434
} as const;
3535

36-
export type FontSize = typeof FontSize[keyof typeof FontSize];
36+
export type FontSize = (typeof FontSize)[keyof typeof FontSize];
3737

3838
export interface ButtonProps {
3939
// Would prefer to use Pick<> to extract these properties, but they would not be correctly imported into Storybook otherwise.

packages/callout/src/Callout/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export const Variant = {
99
Example: 'example',
1010
} as const;
1111

12-
export type Variant = typeof Variant[keyof typeof Variant];
12+
export type Variant = (typeof Variant)[keyof typeof Variant];
1313

1414
export interface CalloutProps extends HTMLElementProps<'div'> {
1515
/**

packages/card/src/Card/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export const ContentStyle = {
55
Clickable: 'clickable',
66
} as const;
77

8-
export type ContentStyle = typeof ContentStyle[keyof typeof ContentStyle];
8+
export type ContentStyle = (typeof ContentStyle)[keyof typeof ContentStyle];
99

1010
export interface CardProps extends DarkModeProps, HTMLElementProps<'div'> {
1111
/**

packages/code/src/Code/Code.types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export const ScrollState = {
55
Both: 'both',
66
} as const;
77

8-
export type ScrollState = typeof ScrollState[keyof typeof ScrollState];
8+
export type ScrollState = (typeof ScrollState)[keyof typeof ScrollState];
99

1010
export type DetailedElementProps<T> = React.DetailedHTMLProps<
1111
React.HTMLAttributes<T>,

packages/code/src/languages.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,4 +92,4 @@ export const SupportedLanguages = {
9292
} as const;
9393

9494
export type SupportedLanguages =
95-
typeof SupportedLanguages[keyof typeof SupportedLanguages];
95+
(typeof SupportedLanguages)[keyof typeof SupportedLanguages];

0 commit comments

Comments
 (0)