UNPKG

@sanity/form-builder

Version:
13 lines (12 loc) 1.11 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.PreviewCard = void 0; var _ui = require("@sanity/ui"); var _styledComponents = _interopRequireDefault(require("styled-components")); var _templateObject; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); } var PreviewCard = (0, _styledComponents.default)(_ui.Card)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n /* this is a hack to avoid layout jumps while previews are loading\n there's probably better ways of solving this */\n min-height: 36px;\n\n /* TextWithTone uses its own logic to set color, and we therefore need\n to override this logic in order to set the correct color in different states */\n &[data-selected],\n &[data-pressed],\n &:active {\n [data-ui='TextWithTone'] {\n color: inherit;\n }\n }\n"]))); exports.PreviewCard = PreviewCard;