@postnord/web-components
Version:
PostNord Web Components
54 lines (53 loc) • 1.44 kB
JavaScript
/*!
* Built with Stencil
* By PostNord.
*/
import { createDocumentation, createComponent } from "../../../globals/documentation/story";
import docs from "./pn-spinner-docs.json";
import { getFigmaUrl } from "../../../globals/figmaLinks";
const { argTypes, textContent } = createDocumentation(docs);
/** Use the `pn-spinner` to display a loading indicator. There are two colors and a size property available. */
const meta = {
title: 'Components/Feedback/Spinner',
parameters: {
docs: {
description: {
story: textContent,
},
},
design: {
type: 'figma',
url: getFigmaUrl(import.meta.url),
},
},
args: {
light: false,
size: 1.5,
},
argTypes,
};
export default meta;
export const PnSpinner = {
name: 'pn-spinner',
render: args => createComponent('pn-spinner', args),
};
/** Use the light version of the spinner. */
export const PnSpinnerLight = {
name: 'pn-spinner (light)',
render: PnSpinner.render,
args: {
light: true,
},
parameters: {
backgrounds: { default: 'darkest' },
},
};
/** Use a custom size for the spinner. In this example, we use `size="6"`, which means `6em`. */
export const PnSpinnerSize = {
name: 'pn-spinner (size)',
render: PnSpinner.render,
args: {
size: 6,
},
};
//# sourceMappingURL=pn-spinner.stories.js.map