@comparaonline/ui-drawer

It has react-modal as peer dependency.

Usage no npm install needed!

<script type="module">
  import comparaonlineUiDrawer from 'https://cdn.skypack.dev/@comparaonline/ui-drawer';
</script>

README

@comparaonline/ui-drawer

Installation

It has react-modal as peer dependency.

yarn add react-modal @comparaonline/ui-drawer

Usage

import Drawer from '@comparaonline/ui-drawer';

<Drawer isOpen anchor="left" maxWidth="600px">
  ...
</Drawer>;

Proptypes

Name Required Type Default Description
isOpen false boolean false Determines open state
anchor false string left, right, top, bottom left
maxWidth false string 320px Max width for left and right anchors
maxHeight false string 100% Max height for top and bottom anchors

For more information about the props see the React Modal usage summary.