UNPKG

970 BTypeScriptView Raw
1import * as React from 'react';
2import * as PropTypes from 'prop-types';
3import { SidebarShowProps as ReakitSidebarShowProps } from 'reakit/ts';
4
5import { SidebarShow as _SidebarShow } from './styled';
6
7export type LocalSidebarShowProps = {
8 children?: React.ReactNode | void;
9 onClick?(): void;
10 show(): void;
11};
12export type SidebarShowProps = LocalSidebarShowProps & ReakitSidebarShowProps;
13
14export const SidebarShow: React.FunctionComponent<LocalSidebarShowProps> = ({ children, ...props }) => (
15 <_SidebarShow {...props}>{children}</_SidebarShow>
16);
17
18export const sidebarShowPropTypes = {
19 children: PropTypes.node,
20 onClick: PropTypes.func,
21 show: PropTypes.func.isRequired
22};
23SidebarShow.propTypes = sidebarShowPropTypes;
24
25export const sidebarShowDefaultProps = {
26 children: null,
27 onClick: undefined
28};
29SidebarShow.defaultProps = sidebarShowDefaultProps;
30
31// @ts-ignore
32const C: React.FunctionComponent<SidebarShowProps> = SidebarShow;
33export default C;