This commit is contained in:
Belén Curcio
2018-07-16 18:23:44 -03:00
parent 4982d8d83e
commit 31113e7ecf
3 changed files with 10 additions and 9 deletions
@@ -28,11 +28,7 @@ const Comment: StatelessComponent<CommentProps> = props => {
<div>
<Popover body={<PermalinkPopover commentId={props.id} />}>
{({ toggleShow, ref }) => (
<Button
onClick={toggleShow}
style={{ color: "red" }}
innerRef={ref}
>
<Button onClick={toggleShow} innerRef={ref} primary>
<Localized id="comments-permalink-share">
<span>Share</span>
</Localized>
@@ -3,5 +3,11 @@
}
.root {
background-color: #fff;
background-color: #ffffff;
border: 1px solid #c9cacb;
box-sizing: border-box;
box-shadow: 1px 1px 4px rgba(0, 0, 0, 0.25);
border-radius: 1px;
padding: 6px 10px;
display: flex;
}
@@ -30,10 +30,9 @@ class Popover extends React.Component<InnerProps> {
public render() {
const { body, children } = this.props;
// const { show } = this.state;
// console.log(children);
const { show } = this.state;
return (
<Attachment body={body} className={styles.root}>
<Attachment body={show ? body : null} className={styles.root}>
{({ ref }) => children({ toggleShow: this.toggleShow, ref })}
</Attachment>
);