forked from mdnice/markdown-nice
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
baeea41
commit 6726a60
Showing
8 changed files
with
99 additions
and
0 deletions.
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,27 @@ | ||
import React, {Component} from "react"; | ||
import {observer, inject} from "mobx-react"; | ||
import {Modal} from "antd"; | ||
|
||
@inject("dialog") | ||
@observer | ||
class HistoryDialog extends Component { | ||
closeDialog = () => { | ||
this.props.dialog.setHistoryOpen(false); | ||
}; | ||
|
||
render() { | ||
return ( | ||
<Modal | ||
title="本地历史" | ||
okText="确认" | ||
cancelText="取消" | ||
visible={this.props.dialog.isHistoryOpen} | ||
onOk={this.closeDialog} | ||
onCancel={this.closeDialog} | ||
> | ||
</Modal> | ||
); | ||
} | ||
} | ||
|
||
export default HistoryDialog; |
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,9 @@ | ||
.nice-btn-history { | ||
padding: 0; | ||
} | ||
|
||
.nice-btn-history-icon { | ||
padding: 6px 7px 10px 7px; | ||
width: 33px; | ||
height: 33px; | ||
} |
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,27 @@ | ||
import React, {Component} from "react"; | ||
import {observer, inject} from "mobx-react"; | ||
import {Button, Tooltip} from "antd"; | ||
|
||
import {ENTER_DELAY, LEAVE_DELAY} from "../../utils/constant"; | ||
import SvgIcon from "../../icon"; | ||
import "./History.css"; | ||
|
||
@inject("dialog") | ||
@observer | ||
class History extends Component { | ||
handleClick = () => { | ||
this.props.dialog.setHistoryOpen(true); | ||
}; | ||
|
||
render() { | ||
return ( | ||
<Tooltip placement="bottom" mouseEnterDelay={ENTER_DELAY} mouseLeaveDelay={LEAVE_DELAY} title="本地历史"> | ||
<Button className="nice-btn-history" onClick={this.handleClick}> | ||
<SvgIcon name="history" className="nice-btn-history-icon" /> | ||
</Button> | ||
</Tooltip> | ||
); | ||
} | ||
} | ||
|
||
export default History; |
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,20 @@ | ||
import React from "react"; | ||
import "./index.css"; | ||
|
||
export default ({fill = "rgba(0,0,0,0.65)", style = {}, className = "icon", viewBox = "0 0 1024 1024"}) => ( | ||
<svg | ||
t="1575107151909" className="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" | ||
p-id="1193" width="200" height="200" | ||
style={style} | ||
viewBox={viewBox} | ||
className={className} | ||
fill={fill} | ||
> | ||
<path | ||
d="M511.998 64C264.574 64 64 264.574 64 511.998S264.574 960 511.998 960 960 759.422 960 511.998 759.422 64 511.998 64z m353.851 597.438c-82.215 194.648-306.657 285.794-501.306 203.579S78.749 558.36 160.964 363.711 467.621 77.917 662.27 160.132c168.009 70.963 262.57 250.652 225.926 429.313a383.995 383.995 0 0 1-22.347 71.993z" | ||
fill="#666666" p-id="1194"></path> | ||
<path | ||
d="M543.311 498.639V256.121c0-17.657-14.314-31.97-31.97-31.97s-31.97 14.314-31.97 31.97v269.005l201.481 201.481c12.485 12.485 32.728 12.485 45.213 0s12.485-32.728 0-45.213L543.311 498.639z" | ||
fill="#666666" p-id="1195"></path> | ||
</svg> | ||
); |
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
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
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
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