Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CounterLabel component #18

Merged
merged 9 commits into from
May 21, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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