Skip to content

Commit

Permalink
[storybook] Add defaultTone property
Browse files Browse the repository at this point in the history
  • Loading branch information
mariuslundgard authored and rexxars committed Oct 6, 2020
1 parent 3446792 commit 0a18c7a
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions packages/@sanity/storybook/src/components/centeredContainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@ import React from 'react'

import styles from './centeredContainer.css'

export function CenteredContainer({children, className: classNameProp, style, ...restProps}) {
export function CenteredContainer({
children,
className: classNameProp,
defaultTone,
style,
...restProps
}) {
const fontSize = number(
'Font size (rem)',
1,
Expand All @@ -16,7 +22,7 @@ export function CenteredContainer({children, className: classNameProp, style, ..
select(
'Background tone',
{'': '(none)', component: 'Component', navbar: 'Navbar'},
'component',
defaultTone || 'component',
'Container'
) || undefined

Expand Down

0 comments on commit 0a18c7a

Please sign in to comment.