mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-20 02:05:21 -04:00
Improvement/move document content into redux (#691)
This commit is contained in:
parent
0750695e2f
commit
1690a7bdcf
15 changed files with 101 additions and 51 deletions
|
@ -2,17 +2,13 @@ import React, { Fragment, useState } from 'react'
|
|||
import { TranslatedIconButton } from '../../../common/icon-button/translated-icon-button'
|
||||
import { RevisionModal } from './revision-modal'
|
||||
|
||||
export interface RevisionButtonProps {
|
||||
noteContent: string
|
||||
}
|
||||
|
||||
export const RevisionButton: React.FC<RevisionButtonProps> = ({ noteContent }) => {
|
||||
export const RevisionButton: React.FC = () => {
|
||||
const [show, setShow] = useState(false)
|
||||
|
||||
return (
|
||||
<Fragment>
|
||||
<TranslatedIconButton size={'sm'} className={'mx-1'} icon={'history'} variant={'light'} i18nKey={'editor.documentBar.revision'} onClick={() => setShow(true)}/>
|
||||
<RevisionModal show={show} onHide={() => setShow(false)} titleI18nKey={'editor.modal.revision.title'} icon={'history'} noteContent={noteContent}/>
|
||||
<RevisionModal show={show} onHide={() => setShow(false)} titleI18nKey={'editor.modal.revision.title'} icon={'history'}/>
|
||||
</Fragment>
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue