diff --git a/plugins/bui-themer/src/components/BuiThemerPage/BuiThemerPage.tsx b/plugins/bui-themer/src/components/BuiThemerPage/BuiThemerPage.tsx index 90e7d21902..a65c35d665 100644 --- a/plugins/bui-themer/src/components/BuiThemerPage/BuiThemerPage.tsx +++ b/plugins/bui-themer/src/components/BuiThemerPage/BuiThemerPage.tsx @@ -31,6 +31,13 @@ import { TabList, Tab, TabPanel, + TextField, + Select, + Checkbox, + Radio, + RadioGroup, + CardHeader, + CardBody, } from '@backstage/ui'; import { convertMuiToBuiTheme } from './convertMuiToBuiTheme'; @@ -41,6 +48,128 @@ interface ThemeContentProps { muiTheme: Theme; } +interface IsolatedPreviewProps { + mode: 'light' | 'dark'; + css: string; +} + +function BuiThemePreview({ mode, css }: IsolatedPreviewProps) { + return ( +
line.trim().startsWith('--bui-')) + .map(line => { + const [key, value] = line.trim().split(':'); + return [key?.trim(), value?.replace(';', '').trim()]; + }) + .filter(([key, value]) => key && value), + ), + width: '100%', + backgroundColor: 'var(--bui-bg-surface-2)', + padding: 'var(--bui-space-3)', + borderRadius: 'var(--bui-radius-2)', + }} + > + + + Theme Preview + + + This preview shows how your theme will look with various Backstage + UI components + + + + + + Button Variants + + + + + + + + + + + Form Inputs + + + +