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

brandImage to occupy 100% of the width of <BrandArea/> #5904

Merged
merged 2 commits into from
Mar 18, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -7732,6 +7732,7 @@ exports[`Storyshots UI|Sidebar/Sidebar loading 1`] = `
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
width: 100%;
-webkit-align-items: center;
-webkit-box-align: center;
-ms-flex-align: center;
Expand All @@ -7750,6 +7751,8 @@ exports[`Storyshots UI|Sidebar/Sidebar loading 1`] = `

.emotion-1 {
display: block;
width: 100%;
height: 100%;
color: inherit;
-webkit-text-decoration: none;
text-decoration: none;
Expand Down Expand Up @@ -8092,6 +8095,7 @@ exports[`Storyshots UI|Sidebar/Sidebar loading 1`] = `
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
width: 100%;
-webkit-align-items: center;
-webkit-box-align: center;
-ms-flex-align: center;
Expand All @@ -8110,6 +8114,8 @@ exports[`Storyshots UI|Sidebar/Sidebar loading 1`] = `

.emotion-1 {
display: block;
width: 100%;
height: 100%;
color: inherit;
-webkit-text-decoration: none;
text-decoration: none;
Expand Down Expand Up @@ -8869,6 +8875,7 @@ exports[`Storyshots UI|Sidebar/Sidebar simple 1`] = `
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
width: 100%;
-webkit-align-items: center;
-webkit-box-align: center;
-ms-flex-align: center;
Expand All @@ -8887,6 +8894,8 @@ exports[`Storyshots UI|Sidebar/Sidebar simple 1`] = `

.emotion-1 {
display: block;
width: 100%;
height: 100%;
color: inherit;
-webkit-text-decoration: none;
text-decoration: none;
Expand Down Expand Up @@ -9354,6 +9363,7 @@ exports[`Storyshots UI|Sidebar/Sidebar simple 1`] = `
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
width: 100%;
-webkit-align-items: center;
-webkit-box-align: center;
-ms-flex-align: center;
Expand All @@ -9372,6 +9382,8 @@ exports[`Storyshots UI|Sidebar/Sidebar simple 1`] = `

.emotion-1 {
display: block;
width: 100%;
height: 100%;
color: inherit;
-webkit-text-decoration: none;
text-decoration: none;
Expand Down Expand Up @@ -10140,6 +10152,7 @@ exports[`Storyshots UI|Sidebar/SidebarHeading customBrandImage 1`] = `
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
width: 100%;
-webkit-align-items: center;
-webkit-box-align: center;
-ms-flex-align: center;
Expand All @@ -10158,6 +10171,8 @@ exports[`Storyshots UI|Sidebar/SidebarHeading customBrandImage 1`] = `

.emotion-1 {
display: block;
width: 100%;
height: 100%;
color: inherit;
-webkit-text-decoration: none;
text-decoration: none;
Expand Down Expand Up @@ -10251,6 +10266,7 @@ exports[`Storyshots UI|Sidebar/SidebarHeading customBrandImage 1`] = `

.emotion-0 {
width: auto;
height: 100%;
display: block;
max-width: 100%;
}
Expand All @@ -10275,6 +10291,7 @@ exports[`Storyshots UI|Sidebar/SidebarHeading customBrandImage 1`] = `
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
width: 100%;
-webkit-align-items: center;
-webkit-box-align: center;
-ms-flex-align: center;
Expand All @@ -10293,6 +10310,8 @@ exports[`Storyshots UI|Sidebar/SidebarHeading customBrandImage 1`] = `

.emotion-1 {
display: block;
width: 100%;
height: 100%;
color: inherit;
-webkit-text-decoration: none;
text-decoration: none;
Expand Down Expand Up @@ -10386,6 +10405,7 @@ exports[`Storyshots UI|Sidebar/SidebarHeading customBrandImage 1`] = `

.emotion-0 {
width: auto;
height: 100%;
display: block;
max-width: 100%;
}
Expand Down Expand Up @@ -10454,6 +10474,7 @@ exports[`Storyshots UI|Sidebar/SidebarHeading linkAndText 1`] = `
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
width: 100%;
-webkit-align-items: center;
-webkit-box-align: center;
-ms-flex-align: center;
Expand All @@ -10472,6 +10493,8 @@ exports[`Storyshots UI|Sidebar/SidebarHeading linkAndText 1`] = `

.emotion-0 {
display: block;
width: 100%;
height: 100%;
color: inherit;
-webkit-text-decoration: none;
text-decoration: none;
Expand Down Expand Up @@ -10583,6 +10606,7 @@ exports[`Storyshots UI|Sidebar/SidebarHeading linkAndText 1`] = `
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
width: 100%;
-webkit-align-items: center;
-webkit-box-align: center;
-ms-flex-align: center;
Expand All @@ -10601,6 +10625,8 @@ exports[`Storyshots UI|Sidebar/SidebarHeading linkAndText 1`] = `

.emotion-0 {
display: block;
width: 100%;
height: 100%;
color: inherit;
-webkit-text-decoration: none;
text-decoration: none;
Expand Down Expand Up @@ -10752,6 +10778,7 @@ exports[`Storyshots UI|Sidebar/SidebarHeading longText 1`] = `
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
width: 100%;
-webkit-align-items: center;
-webkit-box-align: center;
-ms-flex-align: center;
Expand Down Expand Up @@ -10874,6 +10901,7 @@ exports[`Storyshots UI|Sidebar/SidebarHeading longText 1`] = `
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
width: 100%;
-webkit-align-items: center;
-webkit-box-align: center;
-ms-flex-align: center;
Expand Down Expand Up @@ -11030,6 +11058,7 @@ exports[`Storyshots UI|Sidebar/SidebarHeading menuHighlighted 1`] = `
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
width: 100%;
-webkit-align-items: center;
-webkit-box-align: center;
-ms-flex-align: center;
Expand All @@ -11048,6 +11077,8 @@ exports[`Storyshots UI|Sidebar/SidebarHeading menuHighlighted 1`] = `

.emotion-1 {
display: block;
width: 100%;
height: 100%;
color: inherit;
-webkit-text-decoration: none;
text-decoration: none;
Expand Down Expand Up @@ -11176,6 +11207,7 @@ exports[`Storyshots UI|Sidebar/SidebarHeading menuHighlighted 1`] = `
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
width: 100%;
-webkit-align-items: center;
-webkit-box-align: center;
-ms-flex-align: center;
Expand All @@ -11194,6 +11226,8 @@ exports[`Storyshots UI|Sidebar/SidebarHeading menuHighlighted 1`] = `

.emotion-1 {
display: block;
width: 100%;
height: 100%;
color: inherit;
-webkit-text-decoration: none;
text-decoration: none;
Expand Down Expand Up @@ -11407,6 +11441,7 @@ exports[`Storyshots UI|Sidebar/SidebarHeading onlyText 1`] = `
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
width: 100%;
-webkit-align-items: center;
-webkit-box-align: center;
-ms-flex-align: center;
Expand Down Expand Up @@ -11529,6 +11564,7 @@ exports[`Storyshots UI|Sidebar/SidebarHeading onlyText 1`] = `
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
width: 100%;
-webkit-align-items: center;
-webkit-box-align: center;
-ms-flex-align: center;
Expand Down Expand Up @@ -11685,6 +11721,7 @@ exports[`Storyshots UI|Sidebar/SidebarHeading standard 1`] = `
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
width: 100%;
-webkit-align-items: center;
-webkit-box-align: center;
-ms-flex-align: center;
Expand All @@ -11703,6 +11740,8 @@ exports[`Storyshots UI|Sidebar/SidebarHeading standard 1`] = `

.emotion-1 {
display: block;
width: 100%;
height: 100%;
color: inherit;
-webkit-text-decoration: none;
text-decoration: none;
Expand Down Expand Up @@ -11820,6 +11859,7 @@ exports[`Storyshots UI|Sidebar/SidebarHeading standard 1`] = `
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
width: 100%;
-webkit-align-items: center;
-webkit-box-align: center;
-ms-flex-align: center;
Expand All @@ -11838,6 +11878,8 @@ exports[`Storyshots UI|Sidebar/SidebarHeading standard 1`] = `

.emotion-1 {
display: block;
width: 100%;
height: 100%;
color: inherit;
-webkit-text-decoration: none;
text-decoration: none;
Expand Down Expand Up @@ -12040,6 +12082,7 @@ exports[`Storyshots UI|Sidebar/SidebarHeading standardNoLink 1`] = `
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
width: 100%;
-webkit-align-items: center;
-webkit-box-align: center;
-ms-flex-align: center;
Expand Down Expand Up @@ -12168,6 +12211,7 @@ exports[`Storyshots UI|Sidebar/SidebarHeading standardNoLink 1`] = `
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
width: 100%;
-webkit-align-items: center;
-webkit-box-align: center;
-ms-flex-align: center;
Expand Down
5 changes: 5 additions & 0 deletions lib/ui/src/components/sidebar/SidebarHeading.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ const BrandArea = styled.div(({ theme }) => ({
fontWeight: theme.typography.weight.bold,
marginRight: theme.layoutMargin,
display: 'flex',
width: '100%',
alignItems: 'center',
paddingTop: 3,
paddingBottom: 3,
Expand All @@ -27,14 +28,18 @@ const Logo = styled(StorybookLogo)({
height: 22,
display: 'block',
});

const Img = styled.img({
width: 'auto',
height: '100%',
display: 'block',
maxWidth: '100%',
});

const LogoLink = styled.a({
display: 'block',
width: '100%',
height: '100%',
color: 'inherit',
textDecoration: 'none',
});
Expand Down