LoginInputLabel.js 471 B

123456789101112131415161718192021
  1. /* eslint-disable jsx-a11y/label-has-for */
  2. import React from 'react';
  3. import PropTypes from 'prop-types';
  4. import styled from 'styled-components';
  5. const Label = styled.div`
  6. margin-bottom: 8px;
  7. `;
  8. const LoginInputLabel = ({ children, htmlFor }) => (
  9. <Label>
  10. <label htmlFor={htmlFor}>{children}</label>
  11. </Label>
  12. );
  13. LoginInputLabel.propTypes = {
  14. children: PropTypes.node.isRequired,
  15. htmlFor: PropTypes.string.isRequired,
  16. };
  17. export default LoginInputLabel;