@wix/design-system
Version:
@wix/design-system
122 lines (121 loc) • 2.4 kB
JavaScript
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
var _react = _interopRequireDefault(require("react"));
var _react2 = require("@storybook/react");
var _FacesRatingBar = _interopRequireDefault(require("../FacesRatingBar"));
var _jsxFileName = "/home/builduser/work/57e038ea7326c1ec/packages/wix-design-system/dist/cjs/FacesRatingBar/test/FacesRatingBar.visual.jsx",
_this = void 0;
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;
(0, _react2.storiesOf)("".concat(_FacesRatingBar["default"].displayName).concat(describe ? '/' + describe : ''), module).add(it, function () {
return /*#__PURE__*/_react["default"].createElement(_FacesRatingBar["default"], (0, _extends2["default"])({}, commonProps, props, {
__self: _this,
__source: {
fileName: _jsxFileName,
lineNumber: 129,
columnNumber: 21
}
}));
});
});
});