Giter Site home page Giter Site logo

reoilteam / reoil Goto Github PK

View Code? Open in Web Editor NEW
29.0 3.0 7.0 2.19 MB

🧡Reoil is a low-level react original component library which can be used as wapper to replace <div> <img> etc, also can be wrapper for any other components."

License: MIT License

TypeScript 94.88% JavaScript 5.12%
react typescript react-library npm-package react-ui-components react-ui-framework react-ui-kit reoil

reoil's Introduction

reoil

🧡Reoil is a low-level react original component library which can be used as wapper to replace <div> <img> etc, also can be wrapper for any other components."

Offical Website is designing, coming soon ...

Usage

We will release clear official documents in the coming months ...

Components

  • Box
  • Avatar
  • Image
  • Copy
  • Meta

Example usage:

Center all child elements

<Box center>...</Box>

Right bottom all child elements

<Box right bottom>...</Box>

Draw a button with Box

<Box padding={12} borderRadius={8} bg='blue' color='white' pointer>Click Me</Box>

Customize a button component with Box

const MyButton = ({children})=>{
  return <Box padding={12} borderRadius={8} bg='blue' color='white' pointer>{children}</Box>
}

Random or specify Avatar

<Avatar src='random' />
// or specify src
<Avatar src='someurl' />

Image

<Image src='random' width={200} height={100} fit='contain' /> 

Some behavior components:

Click to Copy

<Copy>some text</Copy>
// 'some text' will copy
<Copy>
  <h1>Hello world</h1>
  <p>Nice to meet you</p>
</Copy>
/* 
  'Hello world
  Nice to meet you' will copy
*/

Set title and favicon

<Meta title='Home Page' favicon='some.png' />

Development Build

If you are interested in this library, you are welcome to build it together.

Source Code https://github.com/reoilteam/reoil.

1. Clone or Download

git clone [email protected]:reoilteam/reoil.git

2. Yarn or Npm install packages

yarn install

3. Scripts

  • build:ts - build and export into /dist (not recommend)
  • build:types - build and export *.d.ts declaration files into /dist only
  • build:babel - build and export separated .ts files into /dist (without export declaration files)
  • build - build and export declaration files and separated files info /dist
  • build:rollup - build and export declaration files and one single bundled index.js (recommend)
  • start - watch build in babel way
  • start:rollup - watch build in rollup way (recommend)

I would use:

yarn start:rollup

4. Local Register

In order to use this library in local, register it in local(current path at reoil) :

yarn link

5. Demo & Local Import

In order to develop with acctual demo, you can create an React demo with CRA at any place:

yarn create create-react-app reoil-demo

Then link the local library which registered before:

yarn link reoil

Delete react folder in node_modules handly(important):

🍺 Now, you are good to go!

reoil's People

Contributors

yokiijay avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

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.