mirror of
https://github.com/reduxjs/redux-devtools.git
synced 2024-11-24 02:23:57 +03:00
38 lines
753 B
TypeScript
38 lines
753 B
TypeScript
|
import React, { FunctionComponent } from 'react';
|
||
|
import PropTypes from 'prop-types';
|
||
|
import { StylingFunction } from 'react-base16-styling';
|
||
|
|
||
|
interface Props {
|
||
|
styling: StylingFunction;
|
||
|
shown?: boolean;
|
||
|
children: React.ReactNode;
|
||
|
rotate?: boolean;
|
||
|
}
|
||
|
|
||
|
const RightSlider: FunctionComponent<Props> = ({
|
||
|
styling,
|
||
|
shown,
|
||
|
children,
|
||
|
rotate,
|
||
|
}) => (
|
||
|
<div
|
||
|
{...styling([
|
||
|
'rightSlider',
|
||
|
shown && 'rightSliderShown',
|
||
|
rotate && 'rightSliderRotate',
|
||
|
rotate && shown && 'rightSliderRotateShown',
|
||
|
])}
|
||
|
>
|
||
|
{children}
|
||
|
</div>
|
||
|
);
|
||
|
|
||
|
RightSlider.propTypes = {
|
||
|
styling: PropTypes.func.isRequired,
|
||
|
shown: PropTypes.bool,
|
||
|
children: PropTypes.any.isRequired,
|
||
|
rotate: PropTypes.bool,
|
||
|
};
|
||
|
|
||
|
export default RightSlider;
|