@g9t3n/skeletune-skeleton
v1.0.0
Published
A small React skeleton wrapper component (from skeletune)
Readme
skeletune-skeleton
A small React skeleton wrapper component extracted from the skeletune project.
Install
Install the package (after publishing) or use a local workspace approach.
npm:
npm install skeletune-skeleton
pnpm (workspace):
pnpm -w add -D ./packages/skeletonify
Usage
Import the component and the CSS in your app:
import React from "react";
import Skeleton from "skeletune-skeleton";
import "skeletune-skeleton/style.css";
export default function App() {
return (
<Skeleton isLoading={true}>
<div>
<p>Example</p>
</div>
</Skeleton>
);
}Notes:
- The library declares
reactandreact-domas peer dependencies. - The CSS file is included in
src/style.cssso you can import/compose it into your bundler.
Build
From packages/skeletonify run:
# install dev dependencies (once)
npm install
# build
npm run buildThe build emits compiled JS and type declarations to dist/.
Publish
- Update
package.jsonauthor/keywords/version as needed. - Ensure you have bumped the version.
- npm publish from
packages/skeletonifyor usepnpmworkspace publishing flow.
