-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'next' into fix/theming-flash
# Conflicts: # examples/official-storybook/tests/__snapshots__/storyshots.test.js.snap
- Loading branch information
Showing
31 changed files
with
10,841 additions
and
7,908 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,41 @@ | ||
import React from 'react'; | ||
import Inspector from 'react-inspector'; | ||
import React, { Fragment } from 'react'; | ||
import { styled, withTheme } from '@storybook/theming'; | ||
|
||
import { withTheme } from '@storybook/theming'; | ||
import { ActionBar } from '@storybook/components'; | ||
import Inspector from 'react-inspector'; | ||
import { ActionBar, ScrollArea } from '@storybook/components'; | ||
|
||
import { Actions, Action, Wrapper, InspectorContainer, Counter } from './style'; | ||
import { Action, InspectorContainer, Counter } from './style'; | ||
import { ActionDisplay } from '../../models'; | ||
|
||
export const Wrapper = styled(({ children, className }) => ( | ||
<ScrollArea horizontal vertical className={className}> | ||
{children} | ||
</ScrollArea> | ||
))({ | ||
margin: 0, | ||
padding: '10px 5px 20px', | ||
}); | ||
|
||
const ThemedInspector = withTheme(({ theme, ...props }) => <Inspector theme={theme.addonActionsTheme || 'chromeLight'} {...props} />); | ||
|
||
interface ActionLoggerProps { | ||
actions: ActionDisplay[]; | ||
onClear: () => void; | ||
theme: any; | ||
} | ||
|
||
export const ActionLogger = withTheme(({ actions, onClear, theme }: ActionLoggerProps) => ( | ||
<Wrapper> | ||
<Actions> | ||
export const ActionLogger = ({ actions, onClear }: ActionLoggerProps) => ( | ||
<Fragment> | ||
<Wrapper title="actionslogger"> | ||
{actions.map((action: ActionDisplay) => ( | ||
<Action key={action.id}> | ||
{action.count > 1 && <Counter>{action.count}</Counter>} | ||
<InspectorContainer> | ||
<Inspector | ||
theme={theme.addonActionsTheme || 'chromeLight'} | ||
sortObjectKeys | ||
showNonenumerable={false} | ||
name={action.data.name} | ||
data={action.data.args || action.data} | ||
/> | ||
<ThemedInspector sortObjectKeys showNonenumerable={false} name={action.data.name} data={action.data.args || action.data} /> | ||
</InspectorContainer> | ||
</Action> | ||
))} | ||
</Actions> | ||
</Wrapper> | ||
|
||
<ActionBar actionItems={[{ title: 'Clear', onClick: onClear }]} /> | ||
</Wrapper> | ||
)); | ||
</Fragment> | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
239d9f3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are pushing commits at a very fast pace (accross the whole organization).
Due to that, we cannot deploy the commit 239d9f3.
You can try again later or upgrade your plan.