wix-storybook-utils
Version:
Utilities for automated component documentation within Storybook
13 lines • 951 B
JavaScript
import * as React from 'react';
import classnames from 'classnames';
import Markdown from '../../Markdown';
import styles from './styles.scss';
import { SkeletonRectangle } from '../../SkeletonRectangle/SkeletonRectangle';
export var description = function (_a) {
var _b;
var _c = _a.dataHook, dataHook = _c === void 0 ? '' : _c, text = _a.text, _d = _a.size, size = _d === void 0 ? 'normal' : _d, _e = _a.width, width = _e === void 0 ? '100%' : _e, loading = _a.loading;
return loading ? (React.createElement(SkeletonRectangle, { margin: "0 0 38px 0", height: "24px" })) : (React.createElement("div", { style: { width: width }, className: classnames(styles.description, (_b = {},
_b[styles.descriptionSmall] = size === 'small',
_b)) }, typeof text === 'string' ? (React.createElement(Markdown, { "data-hook": "".concat(dataHook, "-markdown"), source: text })) : (text)));
};
//# sourceMappingURL=description.js.map