mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 09:46:22 +00:00
modify: add esc button for config modal
This commit is contained in:
@@ -1,5 +1,7 @@
|
|||||||
@import('./Tab')
|
@import('./Tab')
|
||||||
|
|
||||||
|
top-bar--height = 50px
|
||||||
|
|
||||||
.root
|
.root
|
||||||
modal()
|
modal()
|
||||||
max-width 800px
|
max-width 800px
|
||||||
@@ -10,17 +12,27 @@
|
|||||||
|
|
||||||
.top-bar
|
.top-bar
|
||||||
absolute top left right
|
absolute top left right
|
||||||
height 50px
|
height top-bar--height
|
||||||
background-color $ui-backgroundColor
|
background-color $ui-backgroundColor
|
||||||
border-bottom solid 1px $ui-borderColor
|
border-bottom solid 1px $ui-borderColor
|
||||||
p
|
p
|
||||||
text-align center
|
text-align center
|
||||||
font-size 18px
|
font-size 18px
|
||||||
line-height 50px
|
line-height top-bar--height
|
||||||
|
|
||||||
|
.top-bar-close
|
||||||
|
position absolute
|
||||||
|
background-color transparent
|
||||||
|
border none
|
||||||
|
top 0
|
||||||
|
right 0
|
||||||
|
text-align center
|
||||||
|
width top-bar--height
|
||||||
|
height top-bar--height
|
||||||
|
|
||||||
.nav
|
.nav
|
||||||
absolute top left right
|
absolute top left right
|
||||||
top 50px
|
top top-bar--height
|
||||||
left 0
|
left 0
|
||||||
width 140px
|
width 140px
|
||||||
margin-left 30px
|
margin-left 30px
|
||||||
@@ -54,7 +66,7 @@
|
|||||||
|
|
||||||
.content
|
.content
|
||||||
absolute left right bottom
|
absolute left right bottom
|
||||||
top 50px
|
top top-bar--height
|
||||||
left 140px
|
left 140px
|
||||||
margin-top 10px
|
margin-top 10px
|
||||||
overflow-y auto
|
overflow-y auto
|
||||||
|
|||||||
@@ -33,6 +33,10 @@ class Preferences extends React.Component {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
handleEscButtonClick () {
|
||||||
|
this.props.close()
|
||||||
|
}
|
||||||
|
|
||||||
renderContent () {
|
renderContent () {
|
||||||
const { boundingBox } = this.state
|
const { boundingBox } = this.state
|
||||||
let { dispatch, config, data } = this.props
|
let { dispatch, config, data } = this.props
|
||||||
@@ -113,6 +117,10 @@ class Preferences extends React.Component {
|
|||||||
<div styleName='top-bar'>
|
<div styleName='top-bar'>
|
||||||
<p>Your menu for Boostnote</p>
|
<p>Your menu for Boostnote</p>
|
||||||
</div>
|
</div>
|
||||||
|
<button styleName='top-bar-close' onClick={(e) => this.handleEscButtonClick(e)}>
|
||||||
|
<div styleName='top-bar-close-mark'>X</div>
|
||||||
|
<div styleName='top-bar-close-text'>esc</div>
|
||||||
|
</button>
|
||||||
<div styleName='nav'>
|
<div styleName='nav'>
|
||||||
{navButtons}
|
{navButtons}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user