UNPKG

@atlaskit/drawer

Version:

A drawer is a panel that slides in from the left side of the screen.

44 lines (43 loc) • 1.28 kB
/* blanket.tsx generated by @compiled/babel-plugin v3.0.2 */ import "./blanket.compiled.css"; import { ax, ix } from "@compiled/react/runtime"; import React from 'react'; import AkBlanket from '@atlaskit/blanket/blanket'; import ExitingPersistence from '@atlaskit/motion/exiting-persistence'; import FadeIn from '@atlaskit/motion/fade-in'; const styles = { blanket: "_kqswh2mm" }; /** * A wrapper around `@atlaskit/blanket` that adds a fade in/out transition. */ const Blanket = ({ isOpen, onBlanketClicked, testId }) => { return /*#__PURE__*/React.createElement(ExitingPersistence, { appear: true }, isOpen && /*#__PURE__*/React.createElement(FadeIn /* * The fade out animation uses half the passed duration so it evens out. */, { duration: "large" /** * We don't expose this on `FadeIn` but it does get passed down. * TODO: figure out how we want to handle this... */ // @ts-ignore , animationTimingFunction: "ease-out" }, ({ className }) => /*#__PURE__*/React.createElement("div", { className: ax([styles.blanket, className]) }, /*#__PURE__*/React.createElement(AkBlanket, { isTinted: true, onBlanketClicked: onBlanketClicked, testId: testId && testId })))); }; export default Blanket;