Giter VIP home page Giter VIP logo

medly-components's Introduction

Medly Components

react version styled-components version typescript version Commitizen friendly

Medly components provides numerous themable react components, each with multiple varitaions of sizes, colors, position etc. You can checkout the storybook of the components here.

Table of Contents

Getting Started

npx create-react-app medly-components-demo --typescript
cd medly-components-demo
npm i styled-components @types/react @types/react-dom @types/styled-components
npm i @medly-components/theme @medly-components/utils @medly-components/icons @medly-components/core @medly-components/layout @medly-components/loaders

Replace content of index.tsx with the following:

import { defaultTheme } from '@medly-components/theme';
import { ThemeProvider } from 'styled-components';
import React from 'react';
import * as ReactDOM from 'react-dom';
import App from './App';

ReactDOM.render(
    <ThemeProvider theme={defaultTheme}>
        <App />
    </ThemeProvider>,
    document.getElementById('root')
);

Replace content in App.tsx with the following:

import React from 'react';
import { Button } from '@medly-components/core';

const App: React.SFC = () => (
    <Button variant="flat" color="primary">
        Click me!
    </Button>
);

export default App;

Packages

Library consists of five packages:

Core package consits of components almost all basic react components like Avatar, Button, Input, List, Modal etc.

Icons package consists of most commonly used svg icons for add, delete, clearfile, clipboard etc exposed as react components.

Layout package consists of components that help in creating a page layout using side panels and nav items, which are exposed as react components.

Themes lets you define how a component should be styled across website. This can be done individually for particular type of components, eg all icons should be solid or can be done for the whole website, like color theme for all type of components across website should be orange.

Utils package consists of most commonly used functionalities or components. Eg String Helper has functions to convert a string to camelCase, case insensitive string comparison etc

Built With

πŸ”₯ react

πŸ’… styled-components

β›‘ typescript

πŸ“š storybook

πŸ’₯ babel

🐐 react-testing-library

npm scripts

  • yarn build to build components
  • yarn commit to commit with conventional-commit approach
  • yarn lint:css to run the css lint
  • yarn lint:ts to run the ts lint
  • yarn lint to run both css & ts lint
  • yarn test to run tests and type check
  • yarn test:update to upgrate snapshots
  • yarn test:watch to watch tests
  • yarn type-check to run tsc to check types
  • yarn test:jest to run test only
  • yarn storybook to run storybook for live reloading your components
  • yarn release to version your components

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.