Add H1 component

This commit is contained in:
Kimmo Puputti 2017-04-11 16:39:25 +03:00
parent 2a7cfbea4f
commit 498c0d61f7
3 changed files with 33 additions and 0 deletions

5
src/components/H1/H1.css Normal file
View file

@ -0,0 +1,5 @@
.root {
font-size: 24px;
font-weight: normal;
letter-spacing: -0.6px;
}

26
src/components/H1/H1.js Normal file
View file

@ -0,0 +1,26 @@
import React, { PropTypes } from 'react';
import classNames from 'classnames';
import css from './H1.css';
const H1 = props => {
const { children, className, ...rest } = props;
const classes = classNames(css.root, className);
return <h1 className={classes} {...rest}>{children}</h1>;
};
const { node, string } = PropTypes;
H1.defaultProps = {
children: null,
className: null,
};
H1.propTypes = {
children: node,
className: string,
};
export default H1;

View file

@ -6,6 +6,7 @@ import CurrencyInput from './CurrencyInput/CurrencyInput';
import DateInput from './DateInput/DateInput';
import Discussion from './Discussion/Discussion';
import FilterPanel from './FilterPanel/FilterPanel';
import H1 from './H1/H1';
import HeroSection from './HeroSection/HeroSection';
import Input from './Input/Input';
import LabeledField from './LabeledField/LabeledField';
@ -36,6 +37,7 @@ export {
DateInput,
Discussion,
FilterPanel,
H1,
HeroSection,
Input,
LabeledField,