JSPM

react-lite-loader

0.1.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 7
  • Score
    100M100P100Q25248F
  • License MIT

Sample React text loader

Package Exports

  • react-lite-loader

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (react-lite-loader) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

react-lite-loader

A sample React text loader.

Installation

npm install --save react-lite-loader

Usage

import React from 'react';
import Loader from 'react-lite-loader';

const sample = <Loader />;

const noAnimation = () => (
    <Loader animation={false}>
        Retrieving data...
    </Loader>
);

const complexChildren = () => (
    <Loader animationDuration='1s'>
        <img src="../assets/images/loader.gif" alt="loading..." />
    </Loader>
);

const applyCssClasses = <Loader className="h1" />;

API

animation: boolean

Indicates if the text will be animated (fade in/out). Defaults to true.

animationDuration: string

The animation duration. Defaults to 1.5s.

className: string

The CSS classes you want to apply on the loader wrapper.

children: any

The content of the loading, could be either a sample text, an image, or nothing. Defaults to 'loading...'

License

MIT © maddeveloper