UNPKG

@lobehub/ui

Version:

Lobe UI is an open-source UI component library for building AIGC web apps

27 lines 2.29 kB
var _templateObject, _templateObject2, _templateObject3; 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 css = _ref.css, token = _ref.token, cx = _ref.cx, stylish = _ref.stylish; var _ref2 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, maxHeight = _ref2.maxHeight, maxWidth = _ref2.maxWidth, minWidth = _ref2.minWidth, minHeight = _ref2.minHeight; var MAX_HEIGHT = typeof maxHeight === 'number' ? "".concat(maxHeight, "px") : maxHeight; var MAX_WIDTH = typeof maxWidth === 'number' ? "".concat(maxWidth, "px") : maxWidth; var MIN_HEIGHT = typeof minHeight === 'number' ? "".concat(minHeight, "px") : minHeight; var MIN_WIDTH = typeof minWidth === 'number' ? "".concat(minWidth, "px") : minWidth; var mask = cx(css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n pointer-events: none;\n\n position: absolute;\n z-index: 1;\n inset: 0;\n\n width: 100%;\n height: 100%;\n\n opacity: 0;\n background: ", ";\n\n transition: opacity 0.3s;\n "])), token.colorBgMask)); return { borderless: stylish.variantBorderlessWithoutHover, filled: cx(stylish.variantOutlinedWithoutHover, stylish.variantFilledWithoutHover), mask: mask, outlined: stylish.variantOutlinedWithoutHover, root: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n position: relative;\n\n overflow: hidden;\n\n width: 100%;\n min-width: ", ";\n max-width: ", ";\n height: auto;\n min-height: ", ";\n max-height: ", ";\n margin-block: 0 1em;\n\n background: ", ";\n border-radius: ", "px;\n\n &:hover {\n .", " {\n opacity: 1;\n }\n }\n "])), MIN_WIDTH, MAX_WIDTH, MIN_HEIGHT, MAX_HEIGHT, token.colorFillTertiary, token.borderRadius, mask), video: css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n cursor: pointer;\n width: 100%;\n "]))) }; });