Skip to content

Commit

Permalink
fix: Fix identation on styleguide template
Browse files Browse the repository at this point in the history
  • Loading branch information
starsociant committed May 19, 2023
1 parent 84939a3 commit 0857db8
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 16 deletions.
Expand Up @@ -42,23 +42,27 @@ export type StyleGuideExamplesBaseProps = DesignableComponentsProps & {

const StyleGuideExamplesBase: FC<StyleGuideExamplesBaseProps> = (props) => {
const { components, content } = props;
const { Wrapper, ItemWrapper, ItemTitle, ItemContent, ...restComponents } =
components;
const {
Wrapper,
ItemWrapper,
ItemTitle,
ItemContent,
...restComponents
} = components;

const finalComponents: DesignableComponents = useMemo(
() =>
Object.entries(restComponents).reduce(
(acc, [key, value]) => ({
...acc,
[key]: flowHoc(
content ? withDefaultContent(content) : identity,
// Remove next 2 lines if we want shared content.
withNode,
withNodeKey(key),
)(value),
}),
{},
),
() => Object.entries(restComponents).reduce(
(acc, [key, value]) => ({
...acc,
[key]: flowHoc(
content ? withDefaultContent(content) : identity,
// Remove next 2 lines if we want shared content.
withNode,
withNodeKey(key),
)(value),
}),
{},
),
[components, content],
);

Expand Down
2 changes: 1 addition & 1 deletion packages/vital-elements/src/styleguide/Page/index.tsx
@@ -1,5 +1,5 @@
import { asFluidToken } from '../../util';
import { vitalPage } from '@bodiless/vital-templates';
import { asFluidToken } from '../../util';
import { TestStyleGuideTemplate } from './StyleGuideTemplate';

const { Typography } = TestStyleGuideTemplate;
Expand Down

0 comments on commit 0857db8

Please sign in to comment.