Show current quoted message above composition field

Note that substantial changes will be required for the updated Android
mockups, putting the quotation into the text box next to the attachment
preview.
This commit is contained in:
Scott Nonnenberg 2018-04-18 13:06:33 -07:00
parent e66f9faf33
commit c71dcf0139
No known key found for this signature in database
GPG key ID: 5F82280C35134661
6 changed files with 314 additions and 2 deletions

View file

@ -14,6 +14,7 @@ interface Props {
isFromMe: string;
isIncoming: boolean;
onClick?: () => void;
onClose?: () => void;
text: string;
}
@ -153,6 +154,22 @@ export class Quote extends React.Component<Props, {}> {
return <div className="ios-label">{label}</div>;
}
public renderClose() {
const { onClose } = this.props;
if (!onClose) {
return null;
}
// We need the container to give us the flexibility to implement the iOS design.
// We put the onClick on both because the Android theme juse uses close-container
return (
<div className="close-container" onClick={onClose}>
<div className="close-button" onClick={onClose}></div>
</div>
);
}
public render() {
const {
authorTitle,
@ -186,6 +203,7 @@ export class Quote extends React.Component<Props, {}> {
{this.renderText()}
</div>
{this.renderIconContainer()}
{this.renderClose()}
</div>
);
}