Themable React components with various configurations to match your needs.
You can checkout the storybook of the components here.
- π Getting Started
- π¦ Packages
- π Built With
- π¨βπ» Contributing
- π Npm Scripts
npx create-react-app medly-components-demo --template typescript
cd medly-components-demo
yarn add styled-components @types/styled-components
yarn add @medly-components/theme @medly-components/utils @medly-components/icons @medly-components/core @medly-components/layout @medly-components/loaders @medly-components/formsReplace the content of index.tsx with the following:
import { defaultTheme } from '@medly-components/theme';
import { CssBaseline } from '@medly-components/core';
import { ThemeProvider } from 'styled-components';
import React from 'react';
import * as ReactDOM from 'react-dom';
import App from './App';
ReactDOM.render(
<ThemeProvider theme={defaultTheme}>
<CssBaseline />
<App />
</ThemeProvider>,
document.getElementById('root')
);Replace the content in App.tsx with the following:
import React from 'react';
import { Button } from '@medly-components/core';
const App: React.FC = () => <Button variant="solid">Click me!</Button>;
export default App;If you are using a static property of any component like Modal.Header, you must add "strictNullChecks": false in your tsconfig.json file.
Library consists of the following five packages:
The Core package consists of almost all basic React components like Avatar, Button, Input, List, Modal, etc.
The Icons package consists of the most commonly used SVG icons exposed as React components.
A few simple SVG loaders exposed as React components.
The Layout package consists of components that help in creating a page layout using side panels and nav items, which are exposed as React components.
The Forms package lets you create dynamic forms using simple json.
Define the theme i.e. the overall look, feel, and style of your website using the Theme package. Each component can be defined individually. For example, all icons of a website can be made solid, the color of all the components can be made orange, etc.
The Utils package consists of the most commonly used functionalities and components. E.g. String Helper has functions to convert a string to camelCase, case insensitive string comparison etc.
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting us the pull requests.
This project exists thanks to all the people who contribute.
π₯ react
β typescript
π storybook
π₯ babel
yarn buildto build componentsyarn committo commit with conventional-commit approachyarn lint:cssto run the css lintyarn lint:tsto run the ts lintyarn lintto run both css & ts lintyarn testto run tests and type checkyarn test:updateto update snapshotsyarn test:watchto watch testsyarn type-checkto run tsc to check typesyarn test:jestto run test onlyyarn storybookto run storybook for live reloading your componentsyarn releaseto publish the latest version to npm
