Skip to content

Commit

Permalink
chore: Support autocomplete for Row and Column gap and alignment (#1424)
Browse files Browse the repository at this point in the history
  • Loading branch information
VincentSmedinga authored Jul 19, 2024
1 parent 3af0b1f commit 84eb512
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/react/src/Column/Column.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import clsx from 'clsx'
import { forwardRef } from 'react'
import type { HTMLAttributes, PropsWithChildren } from 'react'

export const columnGapSizes: Array<string> = ['none', 'extra-small', 'small', 'large', 'extra-large']
export const columnGapSizes: Array<string> = ['none', 'extra-small', 'small', 'large', 'extra-large'] as const

type ColumnTag = 'article' | 'div' | 'section'
type ColumnGap = (typeof columnGapSizes)[number]
Expand Down
2 changes: 1 addition & 1 deletion packages/react/src/Row/Row.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { forwardRef } from 'react'
import type { HTMLAttributes, PropsWithChildren } from 'react'
import type { CrossAlign, MainAlign } from '../common/layout'

export const rowGapSizes: Array<string> = ['none', 'extra-small', 'small', 'large', 'extra-large']
export const rowGapSizes: Array<string> = ['none', 'extra-small', 'small', 'large', 'extra-large'] as const

type RowGap = (typeof rowGapSizes)[number]
type RowTag = 'article' | 'div' | 'section'
Expand Down
4 changes: 2 additions & 2 deletions packages/react/src/common/layout.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export const crossAlignOptions: Array<string> = ['baseline', 'center', 'end', 'start']
export const crossAlignOptions: Array<string> = ['baseline', 'center', 'end', 'start'] as const
export type CrossAlign = (typeof crossAlignOptions)[number]

export const mainAlignOptions: Array<string> = ['around', 'between', 'center', 'end', 'evenly']
export const mainAlignOptions: Array<string> = ['around', 'between', 'center', 'end', 'evenly'] as const
export type MainAlign = (typeof mainAlignOptions)[number]

0 comments on commit 84eb512

Please sign in to comment.