-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
fixes #2903 - Rearrange layout of columns #2936
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
Changes from 4 commits
93f0d3c
b15a400
a2fb50a
ba34458
4de6c69
218fba1
1993a65
59e361c
2f16784
a7ead67
d138a54
c355f81
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| import PropTypes from 'prop-types' | ||
| import React from 'react' | ||
| import CSSModules from 'browser/lib/CSSModules' | ||
| import styles from './ToggleStackDirectionButton.styl' | ||
| import i18n from 'browser/lib/i18n' | ||
|
|
||
| const ToggleStackDirectionButton = ({ | ||
| onClick, isStacking | ||
| }) => ( | ||
| <button styleName='control-splitPanelDirection' onClick={() => onClick(!isStacking)}> | ||
| <img styleName='iconInfo' src={isStacking ? '../resources/icon/icon-panel-split-vertical.svg' : '../resources/icon/icon-panel-split-horizontal.svg'} /> | ||
| <span lang={i18n.locale} styleName='tooltip'>{ | ||
| isStacking ? i18n.__('Split Panels Horizontally') : i18n.__('Split Panels Vertically') | ||
|
|
||
|
||
| }</span> | ||
| </button> | ||
| ) | ||
|
|
||
| ToggleStackDirectionButton.propTypes = { | ||
| onClick: PropTypes.func.isRequired, | ||
| isStacking: PropTypes.bool.isRequired | ||
| } | ||
|
|
||
| export default CSSModules(ToggleStackDirectionButton, styles) | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| .control-splitPanelDirection | ||
| topBarButtonRight() | ||
| position relative | ||
| .iconInfo | ||
| width 13px | ||
| height 13px | ||
| &:hover .tooltip | ||
| opacity 1 | ||
|
|
||
| .tooltip | ||
| tooltip() | ||
| position absolute | ||
| pointer-events none | ||
| top 100% | ||
| left 50% | ||
| transform translateX(-50%) | ||
| white-space nowrap | ||
| z-index 200 | ||
| padding 5px | ||
| line-height normal | ||
| border-radius 2px | ||
| opacity 0 | ||
| transition 0.1s | ||
|
|
||
| .tooltip:lang(ja) | ||
| @extend .tooltip | ||
| right 35px | ||
|
|
||
| body[data-theme="dark"] | ||
| .control-splitPanelDirection | ||
| topBarButtonDark() |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -58,6 +58,7 @@ export const DEFAULT_CONFIG = { | |
| delfaultStatus: 'PREVIEW', // 'PREVIEW', 'CODE' | ||
| scrollPastEnd: false, | ||
| type: 'SPLIT', // 'SPLIT', 'EDITOR_PREVIEW' | ||
| isStacking: false, | ||
|
||
| fetchUrlTitle: true, | ||
| enableTableEditor: false, | ||
| enableFrontMatterTitle: true, | ||
|
|
||
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.
Can you fix the format here too please?
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.
Fixed