UNPKG

@cimpress/react-components

Version:
51 lines 2.02 kB
import React from 'react'; import { CodeExample } from '@cimpress/react-components'; import SpinnerCode from '!raw-loader!./spinner.jsx'; import SpinnerDemo from './spinner.jsx'; import ComponentDoc from '../../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.createElement(ComponentDoc, { name: "Spinner", propInfos: propInfos }, React.createElement(SpinnerDemo, null), React.createElement(CodeExample, { code: SpinnerCode }))); }; export default SpinnerDocs; //# sourceMappingURL=index.js.map