-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
00cc1ed
commit 2b1e368
Showing
8 changed files
with
78 additions
and
1 deletion.
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,5 @@ | ||
```js | ||
<CardContent> | ||
This package contains a <Code>LinePath</Code> component that can do stuff. This is an example description. | ||
</CardContent> | ||
``` |
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,15 @@ | ||
import PropTypes from 'prop-types'; | ||
import styled from 'react-emotion'; | ||
import withTheme from '../../ThemeContext/withTheme'; | ||
|
||
const CardContent = styled('div')({ | ||
lineHeight: 1.8 | ||
}, ({ theme }) => ({ | ||
fontFamily: theme.fontFamily | ||
})); | ||
|
||
CardContent.propTypes = { | ||
theme: PropTypes.object.isRequired | ||
}; | ||
|
||
export default withTheme(CardContent); |
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,3 @@ | ||
```js | ||
<CardTitle>@vx/annotation</CardTitle> | ||
``` |
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,17 @@ | ||
import PropTypes from 'prop-types'; | ||
import styled from 'react-emotion'; | ||
import withTheme from '../../ThemeContext/withTheme'; | ||
|
||
const CardTitle = styled('h3')({ | ||
marginTop: 0, | ||
marginBottom: 12 | ||
}, ({ theme }) => ({ | ||
color: theme.primaryColor, | ||
fontFamily: theme.fontFamily | ||
})); | ||
|
||
CardTitle.propTypes = { | ||
theme: PropTypes.object.isRequired | ||
}; | ||
|
||
export default withTheme(CardTitle); |
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,10 @@ | ||
```js | ||
<div style={{ width: 240 }}> | ||
<Card> | ||
<Card.Title>@vx/annotation</Card.Title> | ||
<Card.Content> | ||
This package contains a <Code>LinePath</Code> component that can do stuff. This is an example description. | ||
</Card.Content> | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import PropTypes from 'prop-types'; | ||
import styled from 'react-emotion'; | ||
import { black, cardGrey } from '../../colors'; | ||
import CardTitle from './CardTitle'; | ||
import CardContent from './CardContent'; | ||
import withTheme from '../ThemeContext/withTheme'; | ||
|
||
const Card = styled('article')({ | ||
padding: 12, | ||
color: black, | ||
backgroundColor: cardGrey | ||
}, ({ theme }) => ({ | ||
fontFamily: theme.fontFamily | ||
})); | ||
|
||
Card.propTypes = { | ||
theme: PropTypes.object.isRequired | ||
}; | ||
|
||
const ThemedCard = withTheme(Card); | ||
|
||
ThemedCard.Title = CardTitle; | ||
ThemedCard.Content = CardContent; | ||
|
||
export default ThemedCard; |
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