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.

31 lines (27 loc) 1.69 kB
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties"; import * as React from "react"; import styled, { css } from "styled-components"; import defaultTheme from "../../defaultTheme"; export var StyledFormFeedback = styled(function (_ref) { var theme = _ref.theme, type = _ref.type, props = _objectWithoutProperties(_ref, ["theme", "type"]); return /*#__PURE__*/React.createElement("div", props); }).withConfig({ displayName: "Feedback__StyledFormFeedback", componentId: "sc-14pcvo1-0" })(["", ""], function (_ref2) { var theme = _ref2.theme; return 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 }; var FormFeedback = function FormFeedback(props) { var children = props.children, dataTest = props.dataTest; return /*#__PURE__*/React.createElement(StyledFormFeedback, { "data-test": dataTest }, children); }; export default FormFeedback;