0.3.0 • Published 4 years ago
ankr-ui v0.3.0
ankr-ui
A React UI library of common components we use in the projects we build for our tutorials at Ankr.
Click here to check out the library's Storybook and all the components
Usage guide
- Install the package from npm
# using npm
npm install ankr-ui
# using yarn
yarn add ankr-ui- Import the CSS at the root of your project (
_app.tsxin Next.js,main.tsxin Vite,index.tsxin CRA)
import 'ankr-ui/dist/tailwind.css';
import '../styles/globals.css';
import type { AppProps } from 'next/app';
function MyApp({ Component, pageProps }: AppProps) {
return <Component {...pageProps} />
}
export default MyApp;- Import the component you want to use
import { Button } from 'ankr-ui';
const Page = () => {
return <Button>gm</Button>;
};
export default Page;Local development
- Clone the repo
git clone https://github.com/dhaiwat10/ankr-ui.gitcdinto the directory and install the dependencies
cd ankr-ui && yarn- Run the development server
yarn dev- Run the Storybook
yarn storybook