UNPKG

@kiwicom/orbit-components

Version:

Orbit-components is a React component library which provides developers with the easiest possible way of building Kiwi.com’s products.

35 lines (31 loc) 1.63 kB
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties"; const _excluded = ["theme", "type"]; import * as React from "react"; import styled, { css } from "styled-components"; import defaultTheme from "../../defaultTheme"; export const StyledFormFeedback = styled(_ref => { let { theme, type } = _ref, props = _objectWithoutProperties(_ref, _excluded); return /*#__PURE__*/React.createElement("div", props); }).withConfig({ displayName: "Feedback__StyledFormFeedback", componentId: "sc-vm458u-0" })(["", ""], ({ theme }) => css(["color:", ";font-family:", ";font-size:", ";font-weight:", ";line-height:", ";width:100%;margin-top:2px;position:absolute;top:100%;max-height:", "px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;& a{color:", ";font-weight:", ";text-decoration:underline;cursor:pointer;}strong,b{font-weight:", ";color:", ";}"], theme.orbit.colorTextError, theme.orbit.fontFamily, theme.orbit.fontSizeFormFeedback, theme.orbit.fontWeightMedium, theme.orbit.lineHeightText, Math.floor(theme.orbit.lineHeightText * parseInt(theme.orbit.fontSizeFormFeedback, 10)), theme.orbit.colorTextError, theme.orbit.fontWeightMedium, theme.fontWeightMedium, theme.paletteInkNormal)); // $FlowFixMe: https://github.com/flow-typed/flow-typed/issues/3653#issuecomment-568539198 StyledFormFeedback.defaultProps = { theme: defaultTheme }; const FormFeedback = props => { const { children, dataTest } = props; return /*#__PURE__*/React.createElement(StyledFormFeedback, { "data-test": dataTest }, children); }; export default FormFeedback;