Giter Site home page Giter Site logo

og-ui's Introduction

OG COP UI Library

Let's make things easy (and beautiful ๐Ÿ’–)

Supported components

  • Buttons (variant: add, delete, save changes, cancel, and loader)
  • Drawer
  • Divider
  • Icons:
    • IconAwesome
    • IconLabel
  • InfoBar (WellInfo previously)
  • ModalDialog
  • Table
  • TableFilter
  • Preloader

Supported containers

  • BaseTable
  • AttendeesTable
  • Dashboard
  • EventTable
  • ExcerciseTable
  • GroupTable
  • LanguageTable
  • LanguageCategoriesTable
  • RoleTable
  • SiteTable
  • UserTable

Run local version of library

Install dependencies with yarn install or npm install.

Run yarn dev or npm run dev to start local dev server (will be run on http://localhost:6006).

Build new version

yarn build

Storybook

Build storybook yarn sb:build or npm run sb:storybook

Run yarn sb:start or npm run sb:start to start local dev server (will be run on http://localhost:6006).

Container in Storybook Exercise Table in Storybook

Add new item with a form in Drawer Open Drawer when add new Event

Delete item confirmation with Modal Dialog Modal Dialog confirming deletion

Table search filter Using table search filter

Integration with other projects

To add the UI library for a first time:

npm i og-ui or yarn add og-ui

To upgrade the current version:

npm update og-ui or yarn upgrade og-ui

Upgrade UI Library version

When time to update library comes (new components added or improved), follow next steps to update the library version.

  • Be sure that your code is well tested, then commit it
  • Increase verion number inside package.json and commit this change
  • Build new version and commit results (TODO: add gitlab worker to build new version)
  • Update related projects (yarn upgrade og-ui or npm update og-ui)

Input params:

  • commit message (string)
  • release type (oneOf: ['patch','major','minor'])

Patch example: 1.0.1 -> 1.0.2 (Increment the third digit) Minor example: 1.0.12 -> 1.1.0 (Increment the middle digit and reset last digit to zero) Major example: 1.3.54 -> 2.0.0 (Increment the first digit and reset middle and last digits to zero)

Details: https://docs.npmjs.com/about-semantic-versioning

Script flow:

  • run build and then build:docs command
  • commit and push changes to git (need to ask comment message as a param)
  • change package version (npm version <update_type>, see release type input param)
  • publish changes to npm (npm publish)

Use in <script/>

<script
  src="https://unpkg.com/react@17/umd/react.development.js"
  crossorigin
></script>
<script
  src="https://unpkg.com/react-dom@17/umd/react-dom.development.js"
  crossorigin
></script>
<script
  src="https://unpkg.com/og-ui-library/dist/og-ui-library.umd.js"
  crossorigin
></script>

...

<script type="text/javascript">
  var placeHere = document.getElementById("content-table-inner");
  var Button = OgUiLib.Button;

  const domContainer = document.getElementById("content-table-inner");
  ReactDOM.render(
    React.createElement(Button, { label: "Victory ๐Ÿ˜ƒ", size: "large" }),
    domContainer
  );
</script>

og-ui's People

Contributors

zlehit avatar bshea5 avatar zoeyleqa avatar

Watchers

 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.