redux-devtools/packages/redux-devtools-inspector-monitor/src/RightSlider.tsx
Nathan Bierema 158ba2ce12
[inspector-monitor] Replace jss with Emotion (#1560)
* Setup Emotion

* Fix setup

* Start conversion

* actionList

* actionListHeader

* actionListRows

* actionListHeaderSelector

* actionListItem

* actionListItemTime

* actionListItemSelector

* actionListItemName

* actionListHeaderSearch

* actionListHeaderWrapper

* actionPreview

* Remaining css

* Format

* Propagate Emotion dependencies

* Fix tests

* Remove styling prop

* Remove jss

* Remove themeState

* Use color map as Emotion theme

* Rework theme resolution

* Inline CSS

* Remove usage of className

* Fix warning

* Create large-spoons-yell.md
2023-12-12 04:02:35 +00:00

39 lines
909 B
TypeScript

import React, { FunctionComponent } from 'react';
interface Props {
shown?: boolean;
children: React.ReactNode;
rotate?: boolean;
}
const RightSlider: FunctionComponent<Props> = ({ shown, children, rotate }) => (
<div
css={[
{
WebkitFontSmoothing: 'subpixel-antialiased', // http://stackoverflow.com/a/21136111/4218591
position: 'absolute',
right: 0,
transform: 'translateX(150%)',
transition: 'transform 0.2s ease-in-out',
},
shown && {
position: 'static',
transform: 'translateX(0)',
},
rotate && {
transform: 'rotateX(90deg)',
transition: 'transform 0.2s ease-in-out 0.08s',
},
rotate &&
shown && {
transform: 'rotateX(0)',
transition: 'transform 0.2s ease-in-out 0.18s',
},
]}
>
{children}
</div>
);
export default RightSlider;