Skip to content

Commit

Permalink
docs: encapsulate MultipleStoryElementsWrapper into a global style de…
Browse files Browse the repository at this point in the history
…corator, add custom padding
  • Loading branch information
YossiSaadi committed Mar 31, 2024
1 parent 0e4a32e commit 01dd01d
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/core/.storybook/preview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ const preview: Preview = {
controls: {
sort: "alpha"
},
layout: "fullscreen",
docs: {
container: ({ children, context }: { children: any; context: any }) => (
<DocsContainer context={context}>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.storyWrapper {
padding: var(--spacing-xl) var(--spacing-large);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { MultipleStoryElementsWrapper } from "vibe-storybook-components";
import cx from "classnames";
import styles from "./withGlobalStyle.module.scss";
import { StoryFn } from "@storybook/react";

const WithGlobalStyle = (Story: StoryFn, { className }: { className: string }) => {
return (
<MultipleStoryElementsWrapper className={cx(styles.storyWrapper, className)}>
<Story />
</MultipleStoryElementsWrapper>
);
};

export default WithGlobalStyle;

0 comments on commit 01dd01d

Please sign in to comment.