UNPKG

suomifi-ui-components

Version:
34 lines (31 loc) 1.71 kB
import { __makeTemplateObject, __assign, __rest } from 'tslib'; import React, { forwardRef } from 'react'; import { css, styled } from 'styled-components'; import { resets } from '../utils/index.js'; var divResets = css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n ", "\n ", "\n display: block;\n max-width: 100%;\n word-wrap: normal;\n word-break: normal;\n white-space: normal;\n"], ["\n ", "\n ", "\n display: block;\n max-width: 100%;\n word-wrap: normal;\n word-break: normal;\n white-space: normal;\n"])), resets.normalize.html, resets.common); var Div = function Div(props) { return /*#__PURE__*/React.createElement("div", __assign({}, props)); }; var HtmlDiv = styled(Div).withConfig({ componentId: "sc-9fbwu8-0" })(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), divResets); var DivWithRef = function DivWithRef(_a) { var forwardedRef = _a.forwardedRef, _b = _a.asProp, Component = _b === void 0 ? 'div' : _b, passProps = __rest(_a, ["forwardedRef", "asProp"]); return /*#__PURE__*/React.createElement(Component, __assign({ ref: forwardedRef }, passProps)); }; var HtmlDivWithRef = styled(DivWithRef).withConfig({ componentId: "sc-9fbwu8-1" })(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), divResets); var HtmlDivWithNativeRef = /*#__PURE__*/forwardRef(function (props, ref) { return /*#__PURE__*/React.createElement(HtmlDivWithRef, __assign({ forwardedRef: ref }, props)); }); var templateObject_1, templateObject_2, templateObject_3; export { HtmlDiv, HtmlDivWithNativeRef, HtmlDivWithRef }; //# sourceMappingURL=HtmlDiv.js.map