UNPKG

@cimpress/react-components

Version:
56 lines 2.43 kB
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); const react_1 = __importDefault(require("react")); const react_components_1 = require("@cimpress/react-components"); const spinner_jsx_1 = __importDefault(require("!raw-loader!./spinner.jsx")); const spinner_jsx_2 = __importDefault(require("./spinner.jsx")); const TabbedComponentDoc_1 = __importDefault(require("../../shared/TabbedComponentDoc")); const SpinnerDocs = () => { const propInfos = [ { name: 'className', type: 'string', default: '', description: "Can be used to manipulate the class name of the spinner's div container", }, { name: 'size', type: 'string', default: 'large', description: 'Width and height of the spinner (Large = 72px, Medium = 38px, Small = 16px).', }, { name: 'duration', type: 'number', default: '2', description: 'Number greater than 0. The duration of the animation (i.e. time taken to make 2 rotations).', }, { name: 'offset', type: 'number', default: '0', description: `Number between 0 and 1 (inclusive). Treated as a percentage. Starts the animation at the given offset time (e.g. offset=0.25 starts the animation 25% of the way through).`, }, { name: 'handleOffset', type: 'function', default: '', description: 'Called when component is unmounted. Argument supplied to callback is the current animation offset.', }, { name: 'fullPage', type: 'boolean', default: 'false', description: 'Setting this to true will render the spinner in the center of the page. (Note this does not take into account vertical scrolling).', }, ]; return (react_1.default.createElement(TabbedComponentDoc_1.default, { name: "Spinner", propInfos: propInfos }, react_1.default.createElement(spinner_jsx_2.default, null), react_1.default.createElement(react_components_1.CodeExample, { code: spinner_jsx_1.default }))); }; exports.default = SpinnerDocs; //# sourceMappingURL=index.js.map