Skip to content

Commit

Permalink
feat(components): time-control-button: use Button component instead
Browse files Browse the repository at this point in the history
  • Loading branch information
stuf committed Oct 19, 2019
1 parent 8bb94d8 commit ba634aa
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/components/ui/TimeControlButton/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,22 @@ import * as U from 'karet.util';
import * as R from 'kefir.ramda';

import * as T from './index.d';

import Button from 'components/ui/Button';
/**
*
* @param {T.Props} props
*/
function TimeControlButton({ count, children }) {
return (
<button onClick={U.doModify(count, R.dec)} disabled={R.equals(count, 0)}>
<Button
group
action={U.doModify(count, R.dec)}
disabled={R.equals(count, 0)}
>
{children}
{U.when(count, U.string`(${count})`)}
</button>
</Button>
);
}

Expand Down

0 comments on commit ba634aa

Please sign in to comment.