UNPKG

@wix/design-system

Version:

@wix/design-system

119 lines 2.15 kB
import _extends from "@babel/runtime/helpers/extends"; var _jsxFileName = "/home/builduser/work/57e038ea7326c1ec/packages/wix-design-system/dist/esm/FacesRatingBar/test/FacesRatingBar.visual.jsx", _this = this; import React from 'react'; import { storiesOf } from '@storybook/react'; import FacesRatingBar from '../FacesRatingBar'; var commonProps = {}; var tests = [{ describe: 'interactive', its: [{ it: 'none', props: { value: 0 } }, { it: 'disapointed', props: { value: 1 } }, { it: 'frowning', props: { value: 2 } }, { it: 'neutral', props: { value: 3 } }, { it: 'smiling', props: { value: 4 } }, { it: 'grining', props: { value: 5 } }] }, { describe: 'read only', its: [{ it: 'disapointed', props: { value: 1, readOnly: true } }, { it: 'frowning', props: { value: 2, readOnly: true } }, { it: 'neutral', props: { value: 3, readOnly: true } }, { it: 'smiling', props: { value: 4, readOnly: true } }, { it: 'grining', props: { value: 5, readOnly: true } }] }, { describe: 'max value', its: [{ it: 'maxValue 2', props: { value: 1, maxValue: 2 } }, { it: 'maxValue 3', props: { value: 2, maxValue: 3 } }, { it: 'maxValue 4', props: { value: 3, maxValue: 4 } }, { it: 'maxValue 5', props: { value: 4, maxValue: 5 } }] }]; tests.forEach(function (_ref) { var describe = _ref.describe, its = _ref.its; its.forEach(function (_ref2) { var it = _ref2.it, props = _ref2.props; storiesOf("".concat(FacesRatingBar.displayName).concat(describe ? '/' + describe : ''), module).add(it, function () { return /*#__PURE__*/React.createElement(FacesRatingBar, _extends({}, commonProps, props, { __self: _this, __source: { fileName: _jsxFileName, lineNumber: 129, columnNumber: 21 } })); }); }); });