mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-05 16:11:33 +08:00
Merge branch 'master' into add-storyshot-addon
This commit is contained in:
commit
c3a40976d4
@ -5,6 +5,8 @@ import { baseFonts } from '@storybook/components';
|
||||
const wrapperStyle = {
|
||||
background: '#F7F7F7',
|
||||
marginBottom: 10,
|
||||
display: 'flex',
|
||||
height: 27,
|
||||
};
|
||||
|
||||
const headingStyle = {
|
||||
@ -14,51 +16,49 @@ const headingStyle = {
|
||||
fontSize: '12px',
|
||||
fontWeight: 'bolder',
|
||||
color: '#828282',
|
||||
border: '1px solid #C1C1C1',
|
||||
textAlign: 'center',
|
||||
borderRadius: '2px',
|
||||
padding: '5px',
|
||||
cursor: 'pointer',
|
||||
padding: 0,
|
||||
margin: 0,
|
||||
float: 'none',
|
||||
overflow: 'hidden',
|
||||
};
|
||||
|
||||
const shortcutIconStyle = {
|
||||
textTransform: 'uppercase',
|
||||
letterSpacing: '3.5px',
|
||||
fontSize: 12,
|
||||
fontWeight: 'bolder',
|
||||
color: 'rgb(130, 130, 130)',
|
||||
border: '1px solid rgb(193, 193, 193)',
|
||||
textAlign: 'center',
|
||||
borderRadius: 2,
|
||||
padding: 5,
|
||||
cursor: 'pointer',
|
||||
margin: 0,
|
||||
display: 'inlineBlock',
|
||||
paddingLeft: 8,
|
||||
float: 'right',
|
||||
marginLeft: 5,
|
||||
padding: 0,
|
||||
margin: '0 0 0 5px',
|
||||
backgroundColor: 'inherit',
|
||||
outline: 0,
|
||||
width: 30,
|
||||
};
|
||||
|
||||
const linkStyle = {
|
||||
textDecoration: 'none',
|
||||
flexGrow: 1,
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center',
|
||||
border: '1px solid rgb(193, 193, 193)',
|
||||
borderRadius: 2,
|
||||
};
|
||||
|
||||
const Header = ({ openShortcutsHelp, name, url }) =>
|
||||
const Header = ({ openShortcutsHelp, name, url }) => (
|
||||
<div style={wrapperStyle}>
|
||||
<a style={linkStyle} href={url} target="_blank" rel="noopener noreferrer">
|
||||
<h3 style={headingStyle}>{name}</h3>
|
||||
</a>
|
||||
<button style={shortcutIconStyle} onClick={openShortcutsHelp}>
|
||||
⌘
|
||||
</button>
|
||||
<a style={linkStyle} href={url} target="_blank" rel="noopener noreferrer">
|
||||
<h3 style={headingStyle}>
|
||||
{name}
|
||||
</h3>
|
||||
</a>
|
||||
</div>;
|
||||
</div>
|
||||
);
|
||||
|
||||
Header.defaultProps = {
|
||||
openShortcutsHelp: null,
|
||||
|
@ -61,7 +61,7 @@
|
||||
"husky": "^0.14.3",
|
||||
"jest": "^20.0.4",
|
||||
"jest-enzyme": "^3.6.1",
|
||||
"lerna": "2.1.1",
|
||||
"lerna": "2.1.2",
|
||||
"lint-staged": "^4.0.2",
|
||||
"lodash": "^4.17.4",
|
||||
"nodemon": "^1.11.0",
|
||||
|
Loading…
x
Reference in New Issue
Block a user