add share and code buttons

Summary: Adds code and share buttons to the editor

Reviewed By: emilsjolander

Differential Revision: D6989097

fbshipit-source-id: 67478fe0810a0af43524f24458c520acf2999219
This commit is contained in:
Daniel Büchele
2018-02-14 10:51:57 -08:00
committed by Facebook Github Bot
parent b1222bf83e
commit 43fda26275
14 changed files with 321 additions and 320 deletions

View File

@@ -11,29 +11,17 @@
*/
import React, {Component} from 'react';
import {Icon} from 'antd';
import './Sidebar.css';
type Props = {
onClose?: () => void,
width?: number,
children: any,
floating?: boolean,
};
export default class Sidebar extends Component<Props> {
render() {
return (
<div
className={`Sidebar ${this.props.visible ? 'visible' : ''} ${
this.props.floating ? 'floating' : ''
}`}
style={{width: this.props.width}}>
{this.props.onClose && (
<div className="SidebarClose">
<Icon type="close" onClick={this.props.onClose} />
</div>
)}
<div className="Sidebar" style={{width: this.props.width}}>
{this.props.children}
</div>
);