import { useAppState } from '../../../../../Application' ; interface WYSIHTMLToolbarCreateLinkProperties { editorLinkTargetType : string ; setEditorLinkTargetType : any ; } export const WYSIHTMLToolbarCreateLink = ( { editorLinkTargetType , setEditorLinkTargetType } ) => ( < div data - wysihtml5 - dialog = 'createLink' className = 'white p2 bg-darken-3' style = { { display : 'none' } } > < input type = 'text' data - wysihtml5 - dialog - field = 'href' defaultValue = 'http://' className = 'input mr1' / > < a data - wysihtml5 - dialog - action = 'save' className = 'btn btn-outline' href = '/inserir' > Inserir < /a> < span className = 'ml2' > < input type = 'checkbox' name = 'editorLinkTargetType' onChange = { e => setEditorLinkTargetType ( e . target . checked ? '_blank' : '_self' ) } value = { editorLinkTargetType } data - wysihtml5 - dialog - field = 'target' / > < label htmlFor = 'editorLinkTargetType' > Abrir link em nova aba < /label> < /span> < /div>); export default ( properties ) : React . ReactElement => { const { state } = useAppState ( ) ; const linkProperties = { editorLinkTargetType : state . plugins . content . editorLinkTargetType } ; return < WYSIHTMLToolbarCreateLink { ... properties } { ... linkProperties } />; } ;