@wix/design-system
Version:
@wix/design-system
102 lines (101 loc) • 4.51 kB
JavaScript
;
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
var _typeof = require("@babel/runtime/helpers/typeof");
exports.__esModule = true;
exports["default"] = void 0;
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
var _react = _interopRequireDefault(require("react"));
var _Sections = require("@wix/wix-storybook-utils/Sections");
var _storySettings = require("../test/storySettings");
var _ = _interopRequireDefault(require(".."));
var examples = _interopRequireWildcard(require("./examples"));
var _jsxFileName = "/home/builduser/work/57e038ea7326c1ec/packages/wix-design-system/dist/cjs/LinearProgressBar/docs/index.story.jsx";
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, "default": e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
var _default = exports["default"] = {
category: _storySettings.storySettings.category,
storyName: 'LinearProgressBar',
component: _["default"],
componentPath: '..',
componentProps: {
errorMessage: 'some error message',
value: 20,
light: false,
error: false,
showProgressIndication: false,
label: '47/125',
skin: 'standard',
min: 0,
max: 100
},
sections: [(0, _Sections.header)({
issueUrl: 'https://github.com/wix-private/wix-design-systems/issues/new/choose',
sourceUrl: 'https://github.com/wix-private/wix-design-systems/tree/master/packages/wix-design-system/src/LinearProgressBar/',
component: /*#__PURE__*/_react["default"].createElement("div", {
style: {
width: '50%'
},
__self: void 0,
__source: {
fileName: _jsxFileName,
lineNumber: 49,
columnNumber: 9
}
}, /*#__PURE__*/_react["default"].createElement(_["default"], {
value: 45,
showProgressIndication: true,
__self: void 0,
__source: {
fileName: _jsxFileName,
lineNumber: 50,
columnNumber: 11
}
}))
}), (0, _Sections.tabs)([(0, _Sections.tab)({
title: 'Description',
sections: [(0, _Sections.columns)([(0, _Sections.description)({
title: 'Description',
text: 'Component for indicating a progress along a process.'
})]), (0, _Sections.columns)([(0, _Sections.importExample)("import { LinearProgressBar } from '@wix/design-system';")]), (0, _Sections.divider)(), (0, _Sections.title)('Examples'), (0, _Sections.code)({
title: 'Progress Indication',
description: 'Displaying a progress indicator in percentage.',
source: examples.progressIndication
}), (0, _Sections.code)({
title: 'Custom Label',
description: 'Displaying custom progress text instead of percentage.',
source: examples.customLabel
}), (0, _Sections.code)({
title: 'Min & Max',
description: 'Custom `min` and `max` values for the progress range.',
source: examples.minMax
}), (0, _Sections.code)({
title: 'Prefix Indication',
description: 'A prefix node displayed before the progress bar.',
source: examples.prefixIndication
}), (0, _Sections.code)({
title: 'Skins',
description: 'LinearProgressBar has 5 skins: `"standard"` (default), `"warning"`, `"success"`, `"premium"` and `"neutral"`.',
source: examples.skins
}), (0, _Sections.code)({
title: 'Padding',
description: 'Override default padding.',
source: examples.padding
}), (0, _Sections.code)({
title: 'Themes',
description: 'Appear in all different themes.',
source: examples.themes
}), (0, _Sections.code)({
title: 'Error',
description: 'Error state',
source: examples.errors
})]
})].concat((0, _toConsumableArray2["default"])([{
title: 'API',
sections: [(0, _Sections.api)()]
}, {
title: 'Testkit',
sections: [(0, _Sections.testkit)()]
}, {
title: 'Playground',
sections: [(0, _Sections.playground)()]
}].map(_Sections.tab))))]
};