UNPKG

jobiqo-cl

Version:

[![CircleCI](https://circleci.com/gh/jobiqo/jobiqo-cl.svg?style=svg&circle-token=5a24efa5b8bbc4879276123e77d0d3f35ca7144c)](https://circleci.com/gh/jobiqo/jobiqo-cl)

35 lines (29 loc) 1.34 kB
'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } var React = require('react'); var React__default = _interopDefault(React); var styled = require('styled-components'); var styled__default = _interopDefault(styled); var index = require('../../../../../node_modules/@reach/alert/es/index.js'); /** * @file index.tsx * * @fileoverview InlineError component. */ // This looks weird but necessary until a solution is found on https://github.com/styled-components/styled-components/pull/2093 // @ts-ignore: This is an anti patttern. remove when fixed in styled components. const StyledMessage = styled__default(props => React__default.createElement(index.default, Object.assign({}, props))) ` &[data-reach-alert] { color: ${props => props.theme.colors.danger}; } `; /** * A message that is shown bellow a input when the input has an error. This message is a way for the user to get immediate feedback on form items * that error for example on blur. */ const InlineError = (props) => { const { message } = props; return (React__default.createElement(StyledMessage, { "data-testid": "alert", type: "polite" }, message)); }; exports.InlineError = InlineError;