Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import PropTypes from "prop-types";
import { AlignTypes } from "@paprika/helpers/lib/customPropTypes";
const propTypes = {
/** Where the calendar is positioned relative to the trigger. */
align: PropTypes.oneOf(AlignTypes.ALL),
/** Distance, in px, between calendar edge and the input. */
offset: PropTypes.number,
/** Number setting the z-index for the calendar */
zIndex: PropTypes.number,
};
const defaultProps = {
align: AlignTypes.BOTTOM,
offset: 8,
zIndex: 1,
};
// shell component for enhancing development experience
function DatePickerPopover() {
import React from "react";
import PropTypes from "prop-types";
import uuid from "uuid/v4";
import { AlignTypes } from "@paprika/helpers/lib/customPropTypes";
import Popover from "@paprika/popover";
import extractChildren from "@paprika/helpers/lib/extractChildren";
import Divider from "./components/Divider";
import Trigger from "./components/Trigger";
import LinkItem from "./components/LinkItem";
import Item from "./components/Item";
import { contentStyles } from "./DropdownMenu.styles";
const propTypes = {
/** Alignment of the dropdown menu */
align: PropTypes.oneOf(AlignTypes.ALL),
/** Children should consist of */
children: PropTypes.node.isRequired,
edge: PropTypes.oneOf([AlignTypes.LEFT, AlignTypes.RIGHT, null]),
};
const defaultProps = {
align: AlignTypes.BOTTOM,
edge: AlignTypes.LEFT,
};
const popoverOffset = 4;
function DropdownMenu(props) {
const { align, children, edge, ...moreProps } = props;