Skip to content

Commit

Permalink
Merge pull request #18 from primer/task/counter-component
Browse files Browse the repository at this point in the history
CounterLabel component
  • Loading branch information
Emily committed May 21, 2018
2 parents cb6d2ba + 4b78324 commit 1229a4c
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 21 deletions.
20 changes: 10 additions & 10 deletions docs/bundle.js

Large diffs are not rendered by default.

14 changes: 3 additions & 11 deletions docs/index.html

Large diffs are not rendered by default.

15 changes: 15 additions & 0 deletions src/CounterLabel.js
@@ -0,0 +1,15 @@
import React from 'react'
import classnames from 'classnames'

const CounterLabel = ({ theme, children}) => (
<span
className={classnames(
'Counter',
theme ? `Counter--${theme}` : null,
)}
>
{children}
</span>
)

export default CounterLabel
12 changes: 12 additions & 0 deletions src/Index.js
Expand Up @@ -18,12 +18,24 @@ import ButtonPrimary from './ButtonPrimary'
import ButtonSecondary from './ButtonSecondary'
import ButtonDanger from './ButtonDanger'
import Flash from './Flash'
import CounterLabel from './CounterLabel'

const Index = props => (
<Page>
<KitProvider>
<Library>
<Library.Nav />
<Example name="CounterLabel">
<CounterLabel>
12
</CounterLabel>
<CounterLabel theme={'gray'}>
13
</CounterLabel>
<CounterLabel theme={'gray-light'}>
13
</CounterLabel>
</Example>
<Example name='Heading'>
<Heading>
Heading
Expand Down

0 comments on commit 1229a4c

Please sign in to comment.