UNPKG

focus-components-v3

Version:

Focus web components to build applications (based on Material Design)

19 lines (16 loc) 405 B
// Dependencies import React, {PropTypes} from 'react'; import i18next from 'i18next'; function Label({name, text}) { const content = text || name; return ( <label data-focus='label' htmlFor={name}> {i18next.t(content)} </label> ); } Label.propTypes = { name: PropTypes.string.isRequired, text: PropTypes.string }; export default Label;