Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

README.md

@equinor/fusion-wc-theme

Published on npm

Install

npm install @equinor/fusion-wc-theme

Fusion Web Components are base of Material Web Components, but uses the EDS (Equinor Design System) for styling / theming. This component is necessary to override the css attributes used in MD (material design)

Usage

Vanilla JS/HTML

<!doctype html>
<html>
  <head>
    <meta charset="utf-8">
    <title>My Example App</title>
  </head>
  <body>
    <!-- Add the Fusion Theme variables to the DOM. -->
    <fwc-theme>
      <!-- The rest of your app code... -->
      <div id="my-app"></div>
    </fwc-theme>
    <!-- The Fusion Web Components use standard JavaScript modules. -->
    <script type="module">
      import '@equinor/fusion-wc-theme';
    </script>
  </body>
</html>

React

import Theme from '@equinor/fusion-wc-theme';
Theme;

export const App => {
  return (
      <fwc-theme>
        <!-- The rest of your react app code. -->
        <MyComponent />
      </fwc-theme>
  );
}