mirror of
https://github.com/muerwre/orchidmap-front.git
synced 2025-04-25 19:16:41 +07:00
TitleDialog: title dialog proto
This commit is contained in:
parent
9d093699dd
commit
ea08ab8a5e
5 changed files with 76 additions and 54 deletions
22
src/components/dialogs/TitleDialog.tsx
Normal file
22
src/components/dialogs/TitleDialog.tsx
Normal file
|
@ -0,0 +1,22 @@
|
|||
import * as React from 'react';
|
||||
import { bindActionCreators } from "redux";
|
||||
import { connect } from 'react-redux';
|
||||
|
||||
interface ITitleDialogProps {
|
||||
editing: boolean,
|
||||
title?: string,
|
||||
}
|
||||
|
||||
export const Component: React.FunctionComponent<ITitleDialogProps> = ({ editing, title }) => (
|
||||
!editing && title &&
|
||||
<div className="title-dialog">
|
||||
<div className="title-dialog-pane title-dialog-name">
|
||||
<h2>{title}</h2>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
||||
const mapStateToProps = ({ user: { editing, title } }) => ({ editing, title });
|
||||
const mapDispatchToProps = dispatch => bindActionCreators({ }, dispatch);
|
||||
|
||||
export const TitleDialog = connect(mapStateToProps, mapDispatchToProps)(Component);
|
Loading…
Add table
Add a link
Reference in a new issue