Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/stories/atoms/Article/index.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react'
import PropTypes from 'prop-types'
import { css } from '@emotion/css'
import { css } from '@emotion/react'

export const Article = ({ id, classNames, children }) => {
const style = css`
Expand Down
2 changes: 1 addition & 1 deletion src/stories/atoms/Avatar/index.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react'
import PropTypes from 'prop-types'
import { css } from '@emotion/css'
import { css } from '@emotion/react'

import { Icon } from '../Icon'
import { sizes, sizeKeys } from '../../../shared/sizes'
Expand Down
2 changes: 1 addition & 1 deletion src/stories/atoms/Box/index.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react'
import PropTypes from 'prop-types'
import { css } from '@emotion/css'
import { css } from '@emotion/react'

export const Box = ({ isTight, isRoomy, classNames, children }) => {
const style = css`
Expand Down
2 changes: 1 addition & 1 deletion src/stories/atoms/Button/index.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react'
import PropTypes from 'prop-types'
import { css } from '@emotion/css'
import { css } from '@emotion/react'

export const Button = ({ size, label, onClick, classNames }) => {
const style = css`
Expand Down
2 changes: 1 addition & 1 deletion src/stories/atoms/Container/index.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react'
import PropTypes from 'prop-types'
import { css } from '@emotion/css'
import { css } from '@emotion/react'

export const Container = ({ id, classNames, children }) => {
const style = css`
Expand Down
2 changes: 1 addition & 1 deletion src/stories/atoms/Heading/index.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react'
import PropTypes from 'prop-types'
import { css } from '@emotion/css'
import { css } from '@emotion/react'

import { sizes } from '../../../shared/sizes'

Expand Down
2 changes: 1 addition & 1 deletion src/stories/atoms/Icon/index.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react'
import PropTypes from 'prop-types'
import { css } from '@emotion/css'
import { css } from '@emotion/react'
import { icons } from '../../../shared/icons'

/**
Expand Down
2 changes: 1 addition & 1 deletion src/stories/atoms/Link/index.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react'
import PropTypes from 'prop-types'
import { css } from '@emotion/css'
import { css } from '@emotion/react'

export const Link = ({ href, label, onClick, target, rel, classNames }) => {
const style = css`
Expand Down
2 changes: 1 addition & 1 deletion src/stories/atoms/Paragraph/index.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react'
import PropTypes from 'prop-types'
import { css } from '@emotion/css'
import { css } from '@emotion/react'

export const Paragraph = ({ classNames, children }) => {
const style = css`
Expand Down
2 changes: 1 addition & 1 deletion src/stories/atoms/Row/index.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react'
import PropTypes from 'prop-types'
import { css } from '@emotion/css'
import { css } from '@emotion/react'

export const Row = ({ justify, classNames, children }) => {
const style = css`
Expand Down
2 changes: 1 addition & 1 deletion src/stories/atoms/Section/index.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react'
import PropTypes from 'prop-types'
import { css } from '@emotion/css'
import { css } from '@emotion/react'

export const Section = ({ id, classNames, children }) => {
const style = css`
Expand Down
4 changes: 3 additions & 1 deletion src/stories/atoms/Spacer/Spacer.stories.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,8 @@ export const Template = (args) => <Spacer {...args} />

Experiment with this story with the Controls addon in the Canvas tab.

{/* https://storybook.js.org/docs/react/api/mdx#play-function */}

<Canvas>
<Story
name="controls"
Expand All @@ -231,9 +233,9 @@ Experiment with this story with the Controls addon in the Canvas tab.
mediumScreen: 'small',
largeScreen: 'small'
}}
// https://storybook.js.org/docs/react/api/mdx#play-function
play={async ({ canvasElement }) => {
const expectedHeight = sizes.small * 16
console.log(expectedHeight)
const theElement = canvasElement.querySelector('[aria-hidden="true"]')
await expect(theElement).not.toBeNull()
await expect(theElement.clientHeight).toEqual(expectedHeight)
Expand Down
5 changes: 2 additions & 3 deletions src/stories/atoms/Spacer/index.jsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
import React from 'react'
import PropTypes from 'prop-types'
import { css } from '@emotion/css'
import { css } from '@emotion/react'

import { sizes, sizeKeys } from '../../../shared/sizes'
import { breakpoints } from '../../../shared/breakpoints'

export const Spacer = ({ smallScreen, mediumScreen, largeScreen }) => {
const style = css`
display: block;
background-color: pink;
height: ${sizes[smallScreen] ?? sizes.normal}rem;

@media (min-width: ${breakpoints.medium}rem) {
Expand All @@ -19,7 +18,7 @@ export const Spacer = ({ smallScreen, mediumScreen, largeScreen }) => {
height: ${sizes[largeScreen] ?? sizes.normal}rem;
}
`

console.log(style)
return <div css={style} aria-hidden="true" />
}

Expand Down
2 changes: 1 addition & 1 deletion src/stories/atoms/Strong/index.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react'
import PropTypes from 'prop-types'
import { css } from '@emotion/css'
import { css } from '@emotion/react'

export const Strong = ({ text, classNames }) => {
const style = css`
Expand Down
2 changes: 1 addition & 1 deletion src/stories/organisms/Header/index.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react'
import PropTypes from 'prop-types'
import { css } from '@emotion/css'
import { css } from '@emotion/react'

import { Button } from '../../atoms/Button'

Expand Down