1.0.0 • Published 5 years ago
test-styled-lib v1.0.0
test-styled-lib
Made with create-react-styled-library
Install Peer Dependencies
npm install --save react styled-componentsInstall
npm install --save test-styled-libUsage
import React from 'react'
import { ThemeProvider, Button } from 'test-styled-lib'
interface AppProps {}
const App: React.FC<AppProps> = () => {
return (
<ThemeProvider>
<Button backgroundColor='primary' color='white'>
Hello, I am a styled button
</Button>
</ThemeProvider>
)
}Live Demo
For examples of the test-styled-lib in action, checkout the storybook here.
Develop
This will open a storybook dev server on http://localhost:8080
$ npm start # this will open storybookBuild
This will output the cjs and es modules to the dist folder
$ npm run buildDeploy github page
This will publish storybook as a Github page
$ npm run deploy-github-pagePublish to npm
(you need to be logged in via npm for publishing)
$ npm publishPublish locally
To create a local TAR file to test before publishing, run
$ npm packThis will create a file called test-styled-lib-1.0.0.tgz
You can use this file as a normal package dependency
by linking in your npm install
$ npm i path/to/test-styled-lib-1.0.0.tgzLicense
MIT © ChristianNik
1.0.0
5 years ago