Skip to content

Commit

Permalink
Consolidate reused types
Browse files Browse the repository at this point in the history
  • Loading branch information
VincentSmedinga committed Nov 7, 2024
1 parent f349157 commit 138bf3b
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion packages/react/src/Column/Column.test.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { render, screen } from '@testing-library/react'
import { createRef } from 'react'
import { Column, columnGapSizes } from './Column'
import { crossAlignOptionsForColumn, mainAlignOptions } from '../common/layout'
import { crossAlignOptionsForColumn, mainAlignOptions } from '../common/types'
import '@testing-library/jest-dom'

describe('Column', () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/react/src/Column/Column.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import clsx from 'clsx'
import { forwardRef } from 'react'
import type { HTMLAttributes, PropsWithChildren } from 'react'
import type { CrossAlignForColumn, MainAlign } from '../common/layout'
import type { CrossAlignForColumn, MainAlign } from '../common/types'

export const columnGapSizes = ['none', 'extra-small', 'small', 'large', 'extra-large'] as const

Expand Down
2 changes: 1 addition & 1 deletion packages/react/src/Row/Row.test.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { render, screen } from '@testing-library/react'
import { createRef } from 'react'
import { Row, rowGapSizes } from './Row'
import { crossAlignOptions, mainAlignOptions } from '../common/layout'
import { crossAlignOptions, mainAlignOptions } from '../common/types'
import '@testing-library/jest-dom'

describe('Row', () => {
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 @@ -6,7 +6,7 @@
import clsx from 'clsx'
import { forwardRef } from 'react'
import type { HTMLAttributes, PropsWithChildren } from 'react'
import type { CrossAlign, MainAlign } from '../common/layout'
import type { CrossAlign, MainAlign } from '../common/types'

export const rowGapSizes = ['none', 'extra-small', 'small', 'large', 'extra-large'] as const

Expand Down
4 changes: 0 additions & 4 deletions packages/react/src/common/aspectRatio.ts

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
export type AspectRatioProps = {
/** The aspect ratio to display media content in. */
aspectRatio?: 'x-tall' | 'tall' | 'square' | 'wide' | 'x-wide' | '2x-wide'
}

export const crossAlignOptions = ['start', 'center', 'baseline', 'end'] as const
export type CrossAlign = (typeof crossAlignOptions)[number]

Expand Down
2 changes: 1 addition & 1 deletion storybook/src/components/Column/Column.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import { Card, Heading, Paragraph } from '@amsterdam/design-system-react'
import { Column } from '@amsterdam/design-system-react/src'
import { crossAlignOptionsForColumn, mainAlignOptions } from '@amsterdam/design-system-react/src/common/layout'
import { crossAlignOptionsForColumn, mainAlignOptions } from '@amsterdam/design-system-react/src/common/types'
import { Meta, StoryObj } from '@storybook/react'

const ThreeItems = [
Expand Down
2 changes: 1 addition & 1 deletion storybook/src/components/Row/Row.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import { Avatar, Heading, Link } from '@amsterdam/design-system-react'
import { Row } from '@amsterdam/design-system-react/src'
import { crossAlignOptions, mainAlignOptions } from '@amsterdam/design-system-react/src/common/layout'
import { crossAlignOptions, mainAlignOptions } from '@amsterdam/design-system-react/src/common/types'
import { Meta, StoryObj } from '@storybook/react'

const ThreeItems = [
Expand Down

0 comments on commit 138bf3b

Please sign in to comment.