-
Notifications
You must be signed in to change notification settings - Fork 150
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(Card): Adding missing MediaItem functionality
- Loading branch information
James Friedman
committed
Dec 7, 2017
1 parent
957ba8d
commit 76c1a16
Showing
4 changed files
with
158 additions
and
60 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -1,40 +1,57 @@ | ||
import React from 'react'; | ||
|
||
import { storiesOf } from '@storybook/react'; | ||
import { action } from '@storybook/addon-actions'; | ||
// import { linkTo } from '@storybook/addon-links'; | ||
// import { Welcome } from '@storybook/react/demo'; | ||
import { boolean } from '@storybook/addon-knobs'; | ||
import { | ||
Card, | ||
CardMedia, | ||
CardPrimary, | ||
CardTitle, | ||
CardSubtitle, | ||
CardSupportingText, | ||
CardActions, | ||
CardAction | ||
Card, | ||
CardHorizontalBlock, | ||
CardMedia, | ||
CardMediaItem, | ||
CardPrimary, | ||
CardTitle, | ||
CardSubtitle, | ||
CardSupportingText, | ||
CardActions, | ||
CardAction | ||
} from './'; | ||
|
||
// storiesOf('Welcome', module).add('to Storybook', () => <Welcome showApp={linkTo('Button')} />); | ||
|
||
storiesOf('Cards', module).add('Card', () => ( | ||
<Card style={{ width: '320px' }} themeDark={boolean('themeDark', false)}> | ||
<CardMedia | ||
style={{ | ||
backgroundImage: | ||
'url(https://material-components-web.appspot.com/images/16-9.jpg)', | ||
height: '12.313rem' | ||
}} | ||
/> | ||
<CardPrimary> | ||
<CardTitle large>Card Title</CardTitle> | ||
<CardSubtitle>Subtitle here</CardSubtitle> | ||
</CardPrimary> | ||
<CardSupportingText /> | ||
<CardActions> | ||
<CardAction>Action 1</CardAction> | ||
<CardAction>Action 2</CardAction> | ||
</CardActions> | ||
</Card> | ||
<div> | ||
<Card style={{ width: '320px' }} themeDark={boolean('themeDark', false)}> | ||
<CardMedia | ||
style={{ | ||
backgroundImage: | ||
'url(https://material-components-web.appspot.com/images/16-9.jpg)', | ||
height: '12.313rem' | ||
}} | ||
/> | ||
<CardPrimary> | ||
<CardTitle large>Card Title</CardTitle> | ||
<CardSubtitle>Subtitle here</CardSubtitle> | ||
</CardPrimary> | ||
<CardSupportingText /> | ||
<CardActions> | ||
<CardAction>Action 1</CardAction> | ||
<CardAction>Action 2</CardAction> | ||
</CardActions> | ||
</Card> | ||
|
||
<Card style={{ width: '320px' }}> | ||
<CardHorizontalBlock> | ||
<CardPrimary> | ||
<CardTitle large>Title Here</CardTitle> | ||
<CardSubtitle>Subtitle Here</CardSubtitle> | ||
</CardPrimary> | ||
<CardMediaItem src="https://material-components-web.appspot.com/images/1-1.jpg" /> | ||
</CardHorizontalBlock> | ||
<CardActions> | ||
<CardAction>Action 1</CardAction> | ||
<CardAction>Action 2</CardAction> | ||
</CardActions> | ||
</Card> | ||
</div> | ||
)); |
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