@lobehub/ui
Version:
Lobe UI is an open-source UI component library for building AIGC web apps
17 lines • 2.27 kB
JavaScript
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
import { createStyles } from 'antd-style';
export var useStyles = createStyles(function (_ref) {
var stylish = _ref.stylish,
cx = _ref.cx,
css = _ref.css,
token = _ref.token;
return {
borderless: cx(stylish.variantBorderlessWithoutHover, css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n border-radius: 0;\n\n pre,\n textarea {\n padding: 0;\n }\n "])))),
filled: stylish.variantFilledWithoutHover,
highlight: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n pointer-events: none;\n "]))),
outlined: stylish.variantOutlinedWithoutHover,
root: css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n position: relative;\n\n overflow: hidden auto;\n\n width: 100%;\n height: fit-content;\n\n font-size: 12px;\n\n border-radius: ", "px;\n\n pre,\n textarea {\n margin: 0;\n padding: 16px;\n }\n\n textarea,\n pre,\n code {\n overflow: hidden;\n\n font-family: ", ";\n font-size: inherit;\n line-height: inherit;\n word-break: inherit;\n word-wrap: break-word;\n white-space: pre-wrap;\n }\n "])), token.borderRadius, token.fontFamilyCode),
textarea: css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n resize: none;\n\n position: absolute;\n inset-block-start: 0;\n inset-inline-start: 0;\n\n overflow: hidden;\n\n box-sizing: border-box;\n width: 100%;\n height: 100%;\n padding: 0;\n\n color: transparent;\n text-align: start;\n\n background: transparent;\n border: none;\n outline: none;\n caret-color: ", ";\n\n &::placeholder {\n color: ", ";\n }\n\n &:focus {\n border: none;\n outline: none;\n box-shadow: none;\n }\n "])), token.colorText, token.colorTextQuaternary)
};
});