@atlaskit/drawer
Version:
A drawer is a panel that slides in from the left side of the screen.
44 lines (43 loc) • 1.41 kB
JavaScript
/* 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';
var styles = {
blanket: "_kqswh2mm"
};
/**
* A wrapper around `@atlaskit/blanket` that adds a fade in/out transition.
*/
var Blanket = function Blanket(_ref) {
var isOpen = _ref.isOpen,
onBlanketClicked = _ref.onBlanketClicked,
testId = _ref.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"
}, function (_ref2) {
var className = _ref2.className;
return /*#__PURE__*/React.createElement("div", {
className: ax([styles.blanket, className])
}, /*#__PURE__*/React.createElement(AkBlanket, {
isTinted: true,
onBlanketClicked: onBlanketClicked,
testId: testId && testId
}));
}));
};
export default Blanket;