Skip to content

Commit

Permalink
fix: showcase styles in themes page (#246)
Browse files Browse the repository at this point in the history
  • Loading branch information
dgaponov authored Aug 8, 2024
1 parent 8db7edd commit 4c3aced
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
4 changes: 3 additions & 1 deletion src/blocks/Examples/components/Showcase/Showcase.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,9 @@ export const Showcase: React.FC<ShowcaseProps> = ({color, theme, style}) => {
return (
<ThemeProvider theme={theme} scoped rootClassName={`${b()} ${b({color, theme})}`}>
{style ? (
<style>{`.gravity-ui-landing-examples-showcase_theme_${theme} {${style}}`}</style>
<style
suppressHydrationWarning={true}
>{`.gravity-ui-landing-examples-showcase_theme_${theme} {${style}}`}</style>
) : null}
<div className={b('row')}>
<div className={b('col')}>
Expand Down
12 changes: 1 addition & 11 deletions src/components/Themes/ui/ComponentPreview/ComponentPreview.tsx
Original file line number Diff line number Diff line change
@@ -1,22 +1,12 @@
import {Flex} from 'landing-uikit';
import {useTranslation} from 'next-i18next';
import dynamic from 'next/dynamic';
import React from 'react';

import {Showcase} from '../../../../blocks/Examples/components/Showcase/Showcase';
import {useThemeCreator} from '../../hooks';
import {exportTheme} from '../../lib/themeCreatorExport';
import {ThemeSection} from '../ThemeSection';

const Showcase = dynamic(
() =>
import('../../../../blocks/Examples/components/Showcase/Showcase').then(
(res) => res.Showcase,
),
{
ssr: false,
},
);

export const ComponentPreview = () => {
const {t} = useTranslation('themes');
const themeState = useThemeCreator();
Expand Down

0 comments on commit 4c3aced

Please sign in to comment.