Rename tone to color

This commit is contained in:
John Lyon-Smith
2018-02-28 11:31:49 -08:00
parent c2eeccb66f
commit 4b733e4a15
4 changed files with 6 additions and 6 deletions

View File

@@ -50,7 +50,7 @@ export default class BoundInput extends React.Component {
onChange={this.handleChange}
placeholder={placeholder} />
<br />
<Text size='small' tone='alert'>{valid ? ' ' : message}</Text>
<Text size='small' color='alert'>{valid ? ' ' : message}</Text>
</div>
)
}

View File

@@ -8,14 +8,14 @@ class Text extends Component {
size: PropTypes.string,
margin: PropTypes.number,
children: PropTypes.node,
tone: PropTypes.string,
color: PropTypes.oneOf(['normal', 'alert', 'dimmed']),
width: PropTypes.oneOfType([ PropTypes.string, PropTypes.number ]),
align: PropTypes.string,
}
static defaultProps = {
size: 'medium',
tone: 'normal',
color: 'normal',
margin: 0,
align: 'left',
}
@@ -28,7 +28,7 @@ class Text extends Component {
display: 'inline-block',
fontSize: fontInfo.size[this.props.size],
fontFamily: fontInfo.family,
color: fontInfo.color[this.props.tone],
color: fontInfo.color[this.props.color],
textAlign: align,
margin,
width,