Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
/**
* add to the pattern library
*/
const SimplePopoverPattern = {
of: "Pattern Library/Atoms/Layout",
name: "Popover",
file: require("raw-loader!./demo/index.html"),
replacements: []
};
window.StorybookUtilities.instance.addPattern(SimplePopoverPattern);
/**
* add the live demo
*/
const props = Object.assign(
AbsolutePositionBehavior.properties,
SimplePopover.properties
);
delete props.target;
props.auto.value = true;
props.for.type = "Select";
props.for.value = "em";
props.for.options = ["em", "p1", "p2", "strong"];
props.position.type = "Select";
props.position.options = ["top", "bottom", "left", "right"];
const SimplePopoverStory = {
of: "Web Components",
name: "simple-popover",
before: `
<div>
<p id="p1">
Aenean eget nisl volutpat, molestie purus eget, bibendum metus. </p></div>