npm.io
0.0.63 • Published 4 years ago

@chastnr-org/components

Licence
MIT
Version
0.0.63
Deps
5
Size
350 kB
Vulns
0
Weekly
0

@chastnr-components

How to install

npm install @chastnr-org/components
yarn add @chastnr-org/components

How to use

Import styles in root index file

import { StrictMode } from 'react';
import { render } from 'react-dom';

import App from './App';

import '@chastnr-org/components/dist/index.scss';
// or
import '@chastnr-org/components/dist/index.css';

const root = document.getElementById('root');

render(
  <StrictMode>
    <App />
  </StrictMode>,
  root
);

or you can add styles in your styles file

@import '~@chastnr-org/components/dist/index.scss';
// or
@import '~@chastnr-org/components/dist/index.css';
@import './fonts.scss';
@import './root.scss';

Now you are ready to use components

import { Checkbox, Input } from '@chastnr-org/components';

const App = () => {
  const [value, setValue] = useState('');

  return (
    <>
      <Input label="Test label" onChange={setValue} value={value} />
      <Checkbox />
    </>
  );
};

Contributing

I welcome all contributions. You can submit any ideas as pull requests or as GitHub issues. If you'd like to improve code, check out the Development Instructions and have a good time! :)