MaltyThemeProvider

Malty's Theme component to use as a wrapper to set a global theme.

App level usage

Here we can see how we could implement MaltyThemeProvider at the top level of a React App. This is the most recommended approach.


                                                        
                                                        
                                                            import React from "react";
                                                        import logo from "./logo.svg";
                                                        import "./App.css";
                                                        import {
                                                          MaltyThemeProvider,
                                                          globalTheme,
                                                        } from "@carlsberggroup/malty.theme.malty-theme-provider";
                                                        
                                                        function App() {
                                                          return (
                                                            <div className="App">
                                                              <MaltyThemeProvider theme={globalTheme}>
                                                                <header className="App-header">
                                                                  <img src={logo} className="App-logo" alt="logo" />
                                                                  <h1>Template App</h1>
                                                                  <p>
                                                                    Edit <code>src/App.tsx</code> and save to reload.
                                                                  </p>
                                                                </header>
                                                              </MaltyThemeProvider>
                                                            </div>
                                                          );
                                                        }
                                                        
                                                        export default App;