Skip to content

Commit

Permalink
fixed few components
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisdugne committed Nov 15, 2017
1 parent f35ce74 commit 8ad505e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const BrandCreateForm = props => {
<input
type="text"
placeholder={field.placeholder}
value={field.value}
defaultValue={field.value}
onInput={handleChange}
/>
{field.label}
Expand Down
9 changes: 7 additions & 2 deletions packages/@coorpacademy-components/src/molecule/card/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import React from 'react';
import PropTypes from 'prop-types';
import classnames from 'classnames';
import get from 'lodash/fp/get';
import noop from 'lodash/fp/noop';
import keys from 'lodash/fp/keys';
import isEmpty from 'lodash/fp/isEmpty';
import pick from 'lodash/fp/pick';
Expand Down Expand Up @@ -96,15 +97,19 @@ const Card = (props, context) => {
backgroundImage: image ? `url('${image}')` : 'none'
}}
>
<div data-name="cover" className={style.ctaWrapper} onClick={!disabled && onClick}>
<div
data-name="cover"
className={style.ctaWrapper}
onClick={!disabled ? onClick : noop}
>
{freeRunIcon}
{emptyIcon}
{adaptivIcon}
{timer}
</div>
</div>
{myprogress}
<div data-name="info" className={style.infoWrapper} onClick={!disabled && onClick}>
<div data-name="info" className={style.infoWrapper} onClick={!disabled ? onClick : noop}>
<div
data-name="type"
className={classnames(style.type, empty ? style.empty : null)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,17 @@ import Provider from '../../../atom/provider';
import style from './style.css';

const FreeText = (props, {skin}) => {
const {placeholder = '', value, defaultValue, onChange = noop} = props;
const {placeholder = '', value = '', onChange = noop} = props;

const handleChange = e => onChange(e.target.value);
const skinView = value || defaultValue ? get('common.primary', skin) : null;
const skinView = value ? get('common.primary', skin) : null;

return (
<div data-name="freeText" className={style.wrapper}>
<input
type="text"
className={style.input}
placeholder={placeholder}
defaultValue={defaultValue}
value={value}
onInput={handleChange}
onChange={noop}
Expand Down

0 comments on commit 8ad505e

Please sign in to comment.