-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add background addon and test setting background in mdx
- Loading branch information
1 parent
2281752
commit 03ed658
Showing
6 changed files
with
261 additions
and
19 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
import React from 'react'; | ||
import Image from '@massds/mayflower-react/dist/Image'; | ||
import logo from '@massds/mayflower-assets/static/images/logo/stateseal.png'; | ||
import logoColor from '@massds/mayflower-assets/static/images/logo/stateseal-color.png'; | ||
import logoBlack from '@massds/mayflower-assets/static/images/logo/stateseal-white.png'; | ||
import logoWhite from '@massds/mayflower-assets/static/images/logo/stateseal-black.png'; | ||
import generateTitle from '../../util/generateTitle'; | ||
|
||
const { STORYBOOK_CDN_PATH } = process.env; | ||
|
||
const darkBackground = (story) => { | ||
return story.parameters = { | ||
backgrounds: { | ||
default: 'dark', | ||
values: [ | ||
{ name: 'light', value: '#eeeeee' }, | ||
{ name: 'dark', value: '#222222' }, | ||
], | ||
} | ||
} | ||
} | ||
|
||
const stateSeal = ( | ||
<Image | ||
alt="the Massachusetts state seal" | ||
src={logo} | ||
width={150} | ||
height={150} | ||
/> | ||
) | ||
|
||
const stateSealColor = ( | ||
<Image | ||
alt="the Massachusetts state seal" | ||
src={logo} | ||
width={150} | ||
height={150} | ||
/> | ||
) | ||
|
||
// exported story names must be unique | ||
export const seal = () => stateSeal; | ||
darkBackground(seal) | ||
|
||
|
||
export const sealColor = () => stateSealColor; | ||
darkBackground(sealColor) |
Oops, something went wrong.