GithubHelp home page GithubHelp logo

wet-react's Introduction

WET-React UI components library

drawing

React implementation of the Web Experience Toolkit (WET).

โš ๏ธ This project is early stages of development. We are actively working hard to implement more components.

Build status

Chromatic Deployment Linting Check codecov npm version

Storybook deployments

The Storybook build can be found here:

Storybook

Core documentation

This react component library is implemented based on the WET frontend CSS framework and React Bootstrap.

The documentation for these core projects can be found here:

WET CSS

WET CSS

The purpose

The purpose of this package is to "Reactify" the Web Experience Toolkit (WET). This will make it faster and easier to develope applications using WET. It also removes the JQuery dependency of WET.

This project has 3 main goals:

  • ๐Ÿš€ make it easier to create frontend apps
  • โ™ฟ have accessible components (WCAG AA)
  • ๐Ÿ“š clean and accurate documentation (Storybook)

How to use

Installation

The best way to consume React-Bootstrap is via the npm package which you can install with npm (or yarn if you prefer).

npm i wet-react

Importing Components

You can import the desired component form @wet-react as shown below

import { Button } from '@wet-react';

Stylesheet

WET-React doesn't ship with a specific stylesheet. It is made to be compatible with either the WET or GCWeb theme (based on Bootstrap 3). To allow for this flexibility, you can choose to import either CSS file in the HTML header of your project.

As an example, using the following file in the HTML header will give the components the GCWeb theme.

<link
  rel="stylesheet"
  href="https://wet-boew.github.io/themes-dist/GCWeb/GCWeb/css/theme.min.css"
/>

Development

How to run locally

  1. clone the repo to you local machine
  2. open terminal inside the project directory
  3. install packages using npm install
  4. launch Storybook using npm run storybook
  5. navigate to http://localhost:6006 to see Storybook running based on you local code. As you save your changes, the storybook will automatically update.

Project scripts

Here is what each script in the package.json does:

  • test: runs the component tests
  • lint: runs ESlint to check for issues
  • lint:fix: runs ESlint to check for issues and auto fixes them
  • prettier: runs prettier to check for code styling issues
  • prettier:fix: runs prettier to check for code styling issues and auto fixes them
  • storybook: spins up a dev instance of Storybook that is based on the local changes. The running application can be found at http://localhost:6006
  • build-storybook: builds a static version of Storybook (not often needed)
  • chromatic: Deploy the current code to a chromatic image and provide a sharable link
  • prepare: Enable Git hooks

wet-react's People

Contributors

dynamic11 avatar ianwilk20 avatar mayowa-awosiyan01 avatar p4ul1029 avatar rizvida1 avatar yaboibreezy avatar

Watchers

 avatar

wet-react's Issues

Fix Modal Component Bugs

Modal component is missing the onHide prop -- a callback fired when a modal is hidden. The props fullscreen and restoreFocus are incorrectly typed.

DataTable test has mui error

console.warn
MUI: The page size 5 is not preset in the rowsPerPageOptions
Add it to show the pagination select.

  at GridPagination (node_modules/@mui/x-data-grid/node/components/GridPagination.js:72:15)
  at renderWithHooks (node_modules/react-dom/cjs/react-dom.development.js:14985:18)
  at updateForwardRef (node_modules/react-dom/cjs/react-dom.development.js:17044:20)
  at beginWork (node_modules/react-dom/cjs/react-dom.development.js:19098:16)
  at beginWork$1 (node_modules/react-dom/cjs/react-dom.development.js:23940:14)
  at performUnitOfWork (node_modules/react-dom/cjs/react-dom.development.js:22779:12)
  at workLoopSync (node_modules/react-dom/cjs/react-dom.development.js:22707:5)
  at renderRootSync (node_modules/react-dom/cjs/react-dom.development.js:22670:7)

wrong import statement in readme

Hey everyone,

I just found out that in the README of this project the import statement is wrong:
"Importing Components
You can import the desired component form @wet-react as shown below

import { Button } from '@wet-react';"
In addition, a small spelling mistake has crept in there ;)

In my opinion, it should read correctly:

"Importing Components
You can import the desired component from wet-react as shown below:

import { Button } from 'wet-react';"

Cheers
Michael

Additional Icon Story Example

Adding an additional example to the Font Awesome story that outlines how to use an IconDefinition with the ShareWidget component.

href's don't work in storybook

When I add an HREF in storybook element to link to something else in the same canvas, it doesn't link. This is an issue for footnotes and lightbox.

Tabs component doesn't mesh with WET-REACT-TEMPLATE

Sometimes changing tabs in tabs-component forces user back to language select screen. It only happens if the tabs-component is on the website-tab that you go to when you first load the page, e.g. 'Home' or current website-tab after refresh. I think the tabs-component is meshing with the website-tabs in the header, but I can't prove it and idk how to troubleshoot it

@Mui causes errors to pop up in template

Errors pop up, changing versions (suggested solution) has no effect. Solution is to replace e.useId and e.useInsertionEffect with e['use'+'Id'] and equivalent inside dist/esm/inde.js, but file is from npm package itself so not a good solution bc difficult to implement and maybe bad practice. Should contact @mui with issue.

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.