wix-style-react
Version:
wix-style-react
22 lines • 794 B
JavaScript
import React, { Component } from 'react';
import { SidebarContext } from '../SidebarAPI';
export class SidebarBackButton extends Component {
constructor() {
super(...arguments);
this.displayName = 'SidebarBackButton';
}
render() {
return (React.createElement(SidebarContext.Consumer, null, context => (React.createElement("div", { onClick: e => {
const { disable, onClick } = this.props;
if (!disable) {
if (onClick) {
onClick(e);
}
if (!e.defaultPrevented) {
context.backClicked();
}
}
} }, this.props.children))));
}
}
//# sourceMappingURL=SidebarBackButton.js.map