-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Card component
- Loading branch information
Showing
7 changed files
with
46 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
A card is a small block used to separate some content from the rest of the UI. | ||
|
||
``` | ||
const { Text, SubTitle } = require('../Text'); | ||
<Card> | ||
<SubTitle className="u-mb-1">This is a card</SubTitle> | ||
<Text className="u-mb-1">This is some card content. Content can be small or huge.</Text> | ||
<Button className="u-ml-0" label="Demo button" /> | ||
</Card> | ||
``` |
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,13 @@ | ||
import React, { PureComponent } from 'react' | ||
import cx from 'classnames' | ||
|
||
import styles from './styles.styl' | ||
|
||
export class Card extends PureComponent { | ||
render() { | ||
const { className, ...rest } = this.props | ||
return <div className={cx(styles['c-card'], className)} {...rest} /> | ||
} | ||
} | ||
|
||
export default Card |
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,8 @@ | ||
@require 'tools/mixins' | ||
@require 'settings/palette' | ||
|
||
.c-card { | ||
border rem(1) solid var(--silver) | ||
border-radius rem(8) | ||
padding rem(16) | ||
} |
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