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

feat: Add InputGroup.Unit #1113

Merged
merged 3 commits into from
Jul 23, 2019
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion react/InputGroup/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const { Bold } = require('../Text');
const Input = require('../Input').default;
<form>
<div>
<InputGroup append={<Bold className="u-pr-1">text</Bold>}>
<InputGroup append={<InputGroup.Unit>€</InputGroup.Unit>}>
<Input placeholder="Placeholder" />
</InputGroup>
</div>
Expand Down
4 changes: 4 additions & 0 deletions react/InputGroup/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,8 @@ InputGroup.defaultProps = {
fullwidth: false
}

InputGroup.Unit = ({ children }) => (
<span className={styles['c-inputgroup-unit']}>{children}</span>
)

export default InputGroup
5 changes: 5 additions & 0 deletions react/InputGroup/styles.styl
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,8 @@

.c-inputgroup-side
@extend $inputgroup-side

.c-inputgroup-unit
padding-left 1rem
padding-right 1rem
font-weight bold
Loading