Skip to content

persistenceOne/persistence-ui-components

Repository files navigation

persistence-ui-components

npm (tag) Libraries.io dependency status for GitHub repo styled with prettier

UI Components and utility library for pSTAKE App.

npm

npm i @persistenceone/persistence-ui-components

Available Components

import {
    Button, 
    ButtonLink, // to redirct from button
    Dropdown,
    Input, 
    Modal, 
    Switch,
    Tabs,
    Spinner,
    Radio
} from "@persistenceone/persistence-ui-components";

Available Hooks

import {
    useLocalStorage, 
    useWindowSize,
    useOnClickOutside,
    useOnlineStatus,
    useSortableTable
} from "@persistenceone/persistence-ui-components";

Available helper functions

import {
    formatNumber,
    stringTruncate,
    truncateToFixedDecimalPlaces,
    numberFormat,
    getTokenImgFromDenom,
    minifiyTxnHash,
    getActiveSideBarItem,
    getChainSpecificAssets,
    getPercentChange
} from "@persistenceone/persistence-ui-components";

TailwindCSS Config

module.exports = {
    content: [
    ...
    "./node_modules/@persistenceone/persistence-ui-components/**/*.{js,ts,jsx,tsx,mdx}",
    ],
}