Skip to content

Commit

Permalink
fix: sx props on story
Browse files Browse the repository at this point in the history
  • Loading branch information
atanasster committed Dec 4, 2020
1 parent ade7cd7 commit ccb1749
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
8 changes: 5 additions & 3 deletions ui/blocks/src/BlockContainer/story/StoryBlockContainer.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import React, { FC, useContext } from 'react';
/** @jsx jsx */
import { FC, useContext } from 'react';
import { jsx } from 'theme-ui';
import { Story } from '@component-controls/core';
import {
BlockContainer,
Expand All @@ -19,11 +21,11 @@ export const StoryBlockContainer: FC<StoryBlockContainerAllProps> = ({
story,
collapsible,
title: userTitle,
sx,
children,
useStoryDescription,
description: userDescription,
'data-testid': dataTestid,
...rest
}) => {
const playground = useContext(PlaygroundContext);
const title = getStoryBlockTitle({
Expand All @@ -39,9 +41,9 @@ export const StoryBlockContainer: FC<StoryBlockContainerAllProps> = ({
title={title}
collapsible={collapsible}
id={userTitle === CURRENT_STORY && story ? story.id : undefined}
sx={sx}
description={description}
plain={true}
{...rest}
>
{children}
</BlockContainer>
Expand Down
1 change: 0 additions & 1 deletion ui/blocks/src/Story/Story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ export const Story: FC<StoryProps> = forwardRef(

const { id, name, ...rest } = props;
const story = useStory({ id, name });

if (story && story.id && story.renderFn) {
return (
<StoryBlockContainer {...rest} story={story}>
Expand Down

0 comments on commit ccb1749

Please sign in to comment.