Skip to content
This repository was archived by the owner on Apr 5, 2022. It is now read-only.

Commit e1e9992

Browse files
committed
Fix appending of classNames in Button.js.
R.concat is a binary function so classNames weren't being appended.
1 parent f9814f3 commit e1e9992

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/components/Button.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
import './Button.css';
22

3-
import { concat } from 'ramda';
3+
import { concat, reduce, unapply } from 'ramda';
44
import React, { PropTypes } from 'react';
55

6+
const concatAll = unapply(reduce(concat, []));
7+
68
const mkButton = buttonType => ({ children, className, type, large, ...otherProps }) => {
7-
const classes = concat(
9+
const classes = concatAll(
810
['btn-d', `${type}-btn`],
911
large ? ['lrg-btn'] : [],
1012
className ? [className] : []

0 commit comments

Comments
 (0)