-
Notifications
You must be signed in to change notification settings - Fork 11
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
chore(Storybook): New UI for Storybook #926
Merged
Merged
Changes from 7 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
41f2355
Update icon-add-more-circle-regular.tsx
yceballost 26c70b5
new ui for storybook
yceballost 1a24f11
Merge branch 'master' into iceballos-storybook-refresh
yceballost 3951b36
update font
yceballost fa61c81
remove import
yceballost d728687
micro-improvements
yceballost f693a6b
Merge branch 'master' into iceballos-storybook-refresh
yceballost 4cb1d52
changes from cr
yceballost ab4b9e1
Update manager-head.html
yceballost 6196ab4
Merge branch 'master' into iceballos-storybook-refresh
yceballost eb424ef
Merge branch 'master' into iceballos-storybook-refresh
yceballost File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
<style type="text/css"> | ||
/* styles for the storybook sidebar */ | ||
.search-result-item { | ||
border-bottom: 1px solid rgba(0, 0, 0, 0.1) !important; | ||
} | ||
.search-result-item--label span { | ||
margin-top: 4px !important; | ||
} | ||
.sidebar-item, | ||
.search-result-item { | ||
padding-top: 0.875em !important; | ||
padding-bottom: 0.875em !important; | ||
font-size: 14px !important; | ||
font-weight: 400 !important; | ||
line-height: normal !important; | ||
display: flex !important; | ||
align-items: center !important; | ||
} | ||
.sidebar-item:first-of-type { | ||
border-bottom: none !important; | ||
} | ||
|
||
/* let flex and align-items control alignment */ | ||
.sidebar-item > span, | ||
.sidebar-item > svg { | ||
margin-top: 0 !important; | ||
} | ||
|
||
/* icon size */ | ||
.sidebar-svg-icon, | ||
.sidebar-item svg, | ||
.search-result-item svg { | ||
width: 4px !important; | ||
height: 4px !important; | ||
color: inherit !important; | ||
opacity: 0 !important; /* hide icon to keep aligment with the rest of list elements */ | ||
yceballost marked this conversation as resolved.
Show resolved
Hide resolved
|
||
} | ||
|
||
/* www should be in lowercase */ | ||
.sidebar-item#www { | ||
text-transform: lowercase; | ||
} | ||
|
||
/* create illusion of hrs between sidebar sections */ | ||
.sidebar-item#www, | ||
.sidebar-item#appendix { | ||
border-top: 2px solid rgba(0, 0, 0, 0.1); | ||
margin-top: 0.5rem; | ||
padding-top: 1rem !important; | ||
} | ||
|
||
/* logo placement tweaks */ | ||
.sidebar-header > div { | ||
margin-right: 0 !important; | ||
} | ||
.sidebar-header a { | ||
margin: 6px 0 !important; | ||
} | ||
.sidebar-header img { | ||
width: 104px !important; | ||
} | ||
.sidebar-subheading { | ||
border-top: 1px solid rgba(0, 0, 0, 0.1) !important; | ||
} | ||
.sidebar-subheading:last-child { | ||
border-bottom: 1px solid rgba(0, 0, 0, 0.1) !important; | ||
padding-bottom: 16px !important; | ||
} | ||
.sidebar-subheading button, | ||
.search-result-recentlyOpened { | ||
letter-spacing: normal !important; | ||
margin-top: 16px !important; | ||
} | ||
.sidebar-subheading span { | ||
margin-right: 12px !important; | ||
} | ||
|
||
/* Search input */ | ||
.search-field input { | ||
height: 40px !important; | ||
padding-left: 32px !important; | ||
} | ||
.search-field svg:nth-child(1) { | ||
top: 14px !important; | ||
left: 14px !important; | ||
} | ||
.search-field svg:nth-child(4) { | ||
top: 12px !important; | ||
right: 13px !important; | ||
} | ||
.search-field code { | ||
top: 12px !important; | ||
right: 13px !important; | ||
} | ||
|
||
/* Main block */ | ||
[role='main'] > div { | ||
border: 1px solid rgba(0, 0, 0, 0.1) !important; | ||
border-radius: 0 !important; | ||
box-shadow: none !important; | ||
box-sizing: content-box !important; | ||
} | ||
</style> |
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 |
---|---|---|
|
@@ -6,4 +6,7 @@ import {createStorybookTheme} from './storybook-manager-theme'; | |
addons.setConfig({ | ||
panelPosition: 'right', | ||
theme: createStorybookTheme('Movistar'), | ||
toolbar: { | ||
title: {hidden: true}, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
}, | ||
}); |
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
are all those
!important
needed? There isn't any official way of customizing these storybook styles?I'm afraid a future update of storybook could break this
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.
I followed the example from NASA storybook. I can try to remove
!important
as much as possiblehttps://github.com/nasa-jpl/explorer-1/blob/main/storybook/manager-head.html
https://storybook.js.org/docs/react/configure/theming#css-escape-hatches
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.
I removed
!important
tag from the most of cases. The cases with!important
needs it to force override the styles :(