UNPKG

@wix/design-system

Version:

@wix/design-system

109 lines 2.87 kB
import _extends from "@babel/runtime/helpers/extends"; var _jsxFileName = "/home/builduser/work/57e038ea7326c1ec/packages/wix-design-system/dist/esm/StarsRatingBar/test/StarsRatingBar.visual.jsx", _this = this; import React from 'react'; import { storiesOf } from '@storybook/react'; import StarsRatingBar from '../StarsRatingBar'; var commonProps = { value: 3 }; var tests = [{ describe: 'modes', its: [{ it: 'interactive', props: {} }, { it: 'read only', props: { readOnly: true } }] }, { describe: 'size', its: [{ it: 'tiny- (read only mode)', props: { size: 'tiny', readOnly: true } }, { it: 'small- (read only mode)', props: { size: 'small', readOnly: true } }, { it: 'medium- (read only mode)', props: { size: 'medium', readOnly: true } }, { it: 'large- (read only mode)', props: { size: 'large', readOnly: true } }, { it: 'medium - (interactive mode)', props: { size: 'medium' } }, { it: 'large - (interactive mode)', props: { size: 'large' } }] }, { describe: 'rate captions', its: [{ it: 'example', props: { descriptionValues: ['Bad', 'Not good', 'Ok', 'Good', 'Excellent'] } }] }]; tests.forEach(function (_ref) { var describe = _ref.describe, its = _ref.its; its.forEach(function (_ref2) { var it = _ref2.it, props = _ref2.props; storiesOf("".concat(StarsRatingBar.displayName).concat(describe ? '/' + describe : ''), module).add(it, function () { return /*#__PURE__*/React.createElement(StarsRatingBar, _extends({}, commonProps, props, { __self: _this, __source: { fileName: _jsxFileName, lineNumber: 88, columnNumber: 21 } })); }); }); }); storiesOf("".concat(StarsRatingBar.displayName, "/semantic classes"), module).add('styles', function () { return /*#__PURE__*/React.createElement("div", { __self: _this, __source: { fileName: _jsxFileName, lineNumber: 95, columnNumber: 5 } }, /*#__PURE__*/React.createElement("style", { __self: _this, __source: { fileName: _jsxFileName, lineNumber: 96, columnNumber: 7 } }, "\n .stars-rating-bar__filled-icon {\n transform: scale(1.5);\n }\n .stars-rating-bar__empty-icon {\n transform: rotate(20deg);\n }\n .stars-rating-bar__button--interactive {\n background-color: #FFDFF5 !important;\n margin: 5px;\n border-radius: 30%;\n padding: 5px;\n }\n "), /*#__PURE__*/React.createElement(StarsRatingBar, { value: 3, __self: _this, __source: { fileName: _jsxFileName, lineNumber: 112, columnNumber: 7 } })); });