mirror of
https://github.com/wassname/talk.git
synced 2026-09-10 12:43:11 +08:00
Ready
This commit is contained in:
@@ -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>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user