diff --git a/plugins/bui-themer/src/components/BuiThemerPage/BuiThemerPage.tsx b/plugins/bui-themer/src/components/BuiThemerPage/BuiThemerPage.tsx index 061ea379cd..90e7d21902 100644 --- a/plugins/bui-themer/src/components/BuiThemerPage/BuiThemerPage.tsx +++ b/plugins/bui-themer/src/components/BuiThemerPage/BuiThemerPage.tsx @@ -27,6 +27,10 @@ import { HeaderPage, Text, Switch, + Tabs, + TabList, + Tab, + TabPanel, } from '@backstage/ui'; import { convertMuiToBuiTheme } from './convertMuiToBuiTheme'; @@ -46,6 +50,7 @@ function ThemeContent({ const [generatedCss, setGeneratedCss] = useState(''); const [isPreviewMode, setIsPreviewMode] = useState(false); const [includeThemeId, setIncludeThemeId] = useState(false); + const [activeTab, setActiveTab] = useState('css'); const css = useMemo(() => { return convertMuiToBuiTheme(muiTheme, { @@ -123,85 +128,114 @@ function ThemeContent({ - - - - Generated CSS: - - - {generatedCss} - - + setActiveTab(key as string)} + > + + Generated CSS + Live Preview + - {isPreviewMode && ( - - - Live Preview: - - - - - Solid Button - - - Tint Button - - - Surface Card - - + + + + Generated CSS: + + + {generatedCss} + - - )} + + + + + + + + + {isPreviewMode ? ( + + + Live Preview: + + + + + Solid Button + + + Tint Button + + + Surface Card + + + + + ) : ( + + + Click "Start Preview" to see the theme applied to sample + components. + + + )} + + +