πŸš€ Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more β†’
Socket
DemoInstallSign in
Socket

@engie-group/fluid-design-system-react

Package Overview
Dependencies
Maintainers
2
Versions
81
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@engie-group/fluid-design-system-react

Fluid Design System React

0.1.0-alpha.8
npm
Version published
Weekly downloads
649
-32.61%
Maintainers
2
Weekly downloads
Β 
Created
Source

React Fluid Design System by ENGIE

Quick Start

Install the package inside your application:

npm install @engie-group/fluid-design-system-react

How to use

Font & css

<link href="https://fonts.googleapis.com/css?family=Material+Icons|Lato:300,400,700,900&amp;display=swap" rel="stylesheet"/>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@engie-group/fluid-design-system@4.4.0/lib/fluid-design-system.css">

Using global React component library

import '@engie-group/fluid-design-system/lib/fluid-design-system.css'; //CSS optional if loaded via link tag
import {Button} from '@engie-group/fluid-design-system-react/lib/fluid-design-system-react.js';// JS library

function App() {
   return (
   <div>
    <Button label="Mon label" />
   </div>
  );
}

ReactDOM.render(
 <App />,
 document.getElementById('root')
);

With component library

 import '@engie-group/fluid-design-system/lib/components/button/index.css'; //CSS import optional if loaded via link tag
 import {Button} from "@engie-group/fluid-design-system-react/lib/components/button/Button";

Using sources

You can use typescript react sources as well with css modules:

import '@engie-group/fluid-design-system/src/components/button/_index.scss'; //SASS import optional or CSS
import {Button} from "@engie-group/fluid-design-system-react/src/components/button/Button";

From browser

replace publicPath/fluid-react/lib/components/ by your own public Path

    ...
    <body>
        <div id="root">
        </div>
        <script src="https://unpkg.com/react@16.13.1/umd/react.development.js"></script>
        <script src="https://unpkg.com/react-dom@16.13.1/umd/react-dom.development.js"></script>
        <script src="https://cdn.jsdelivr.net/npm/@engie-group/fluid-design-system@0.1.0-alpha.7/lib/components/button/Button.js"></script>
        <script src="https://cdn.jsdelivr.net/npm/@engie-group/fluid-design-system-react@0.1.0-alpha.7/lib/components/footer/Footer.js"></script>
        <script>

          document.addEventListener("DOMContentLoaded", function () {
            ReactDOM.render(
              React.createElement("div", null,
                React.createElement(Button.Button, {label: "Label", variant: "success"}, "button"),
                React.createElement(Footer.Footer, null, "footer")
              )
              ,
              document.getElementById('root')
            );
          });
        </script>
    </body>
    </html>

How to Contribute new Components

  • Create a component folder inside src/components:

    src/components -  
                 / componentName -  
                                 / ComponentName.tsx  
                                 / test -  
                                        /ComponentName.test.tsx
    
  • Update src/fluid-design-system-react.ts by adding component import/export

  • Update webpack.config.js with component build, be careful to match upper/lowercase:

         {
           ...BASE_CONFIG,
           ...{
             name: 'componentName',
             entry: './src/components/componentName/ComponentName.tsx',
             output: {
               ...BASE_CONFIG_OUTPUT,
               ...{
                 filename: './components/componentName/ComponentName.js',
                 library: 'ComponentName'
               }
             }
           }
         }
    
  • Create a component folder inside fluid-doc-react package:

    src/stories/componentName/ComponentName.stories.js
    

Component tests on browsers and devices

NameChrome Mac 86 >FirefoxSafariIOS SafariChrome android
Alertβœ…βœ…
Breadcrumbβœ…βœ…
Buttonβœ…βœ…
Cardβœ…
Checkboxβœ…
Footerβœ…
Iconsβœ…
Linkβœ…
Modalβœ…βœ…
Paginationβœ…βœ…
Progressβœ…βœ…
Radioβœ…βœ…
Sliderβœ…βœ…
Switchβœ…βœ…
Tabsβœ…βœ…
Tagβœ…βœ…
Toggleβœ…
Tooltipβœ…

Component WCAG tests

Namekeyboard navigationAria attribute
Alertβœ…
Buttonβœ…βœ…
Breadcrumbβœ…
Cardβœ…
Checkboxβœ…
Footerβœ…
Iconsβœ…
Linkβœ…βœ…
Modalβœ…βœ…
Paginationβœ…βœ…
Progressβœ…βœ…
Radioβœ…βœ…
Sliderβœ…
Switchβœ…βœ…
Tabsβœ…βœ…
Tagβœ…βœ…
Toggleβœ…βœ…
Tooltipβœ…

Components development state

You can check our state of development on our Confluence page

Keywords

engie

FAQs

Package last updated on 24 Mar 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts