@redhat-developer/red-hat-developer-hub-theme v0.5.1
RHDH / Red Hat Developer Hub Theme 🎨
A set of theming options for MUI Material UI and Backstage that look more similar to PatternFly.
It also includes a Storybook and a Storybook test-runner for automatic visual regression tests.
API
Returns all testable themes (incl. the backstage default color scheme and older RHDH versions):
getAllThemes: () => AppTheme[]useAllThemes: () => AppTheme[]
Returns the latest, not released RHDH light and dark theme for your backstage/RHDH instance:
getThemes: () => AppTheme[]useThemes: () => AppTheme[]useLoaderTheme: () => MUIv5.Theme
Install dependencies
npm install @redhat-developer/red-hat-developer-hub-themeor
yarn add @redhat-developer/red-hat-developer-hub-themeUse it with RHDH app
Starting with 1.2 this library is shipped with your RHDH installation.
On older RHDH instances you can install it:
Install the dependency with
yarn workspace app add @redhat-developer/red-hat-developer-hub-themeIn
packages/app/src/components/DynamicRoot/DynamicRoot.tsximport { useThemes } from '@redhat-developer/red-hat-developer-hub-theme'; // ... const themes = useThemes(); // ... app.current = createApp({ apis: [...staticApis, ...remoteApis], // ... remove defaultThemes from here: themes, components: defaultAppComponents, });
Use it with any Backstage app
Install the dependency with
yarn workspace app add @redhat-developer/red-hat-developer-hub-themeUpdate
packages/app/src/App.tsxand apply the themes tocreateApp:import { getThemes } from '@redhat-developer/red-hat-developer-hub-theme'; // ... const app = createApp({ apis, // ... themes: getThemes(),
Use it while developing a plugin
Install the dependency with
yarn workspace <plugin-root or plugin-name> add @redhat-developer/red-hat-developer-hub-themeAdd to your
*/dev/index.tsx:import { getAllThemes } from '@redhat-developer/red-hat-developer-hub-theme'; // ... createDevApp() .registerPlugin(...) .addThemes(getAllThemes()) .addPage({ // ... }) .render();
Use yarn link
Clone the rhdh theme and run
npm linkin it:cd red-hat-developer-hub-theme yarn linkTo use this link you can cd any other repository:
cd ../backstage-plugins yarn link @redhat-developer/red-hat-developer-hub-theme
Additional links
- Backstage
- PatternFly
- MUI v4:
- MUI v5
9 months ago
9 months ago
7 months ago
9 months ago
9 months ago
7 months ago
11 months ago
9 months ago
7 months ago
7 months ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago