Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Height aligned 2 buttons in manager's header #1769

Merged
merged 2 commits into from
Aug 30, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 18 additions & 18 deletions lib/ui/src/modules/ui/components/left_panel/header.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import { baseFonts } from '@storybook/components';
const wrapperStyle = {
background: '#F7F7F7',
marginBottom: 10,
display: 'flex',
height: 27,
};

const headingStyle = {
Expand All @@ -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,
Expand Down