How to use the @lrnwebcomponents/absolute-position-behavior/absolute-position-behavior.js.AbsolutePositionBehavior.properties function in @lrnwebcomponents/absolute-position-behavior

To help you get started, we’ve selected a few @lrnwebcomponents/absolute-position-behavior examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github elmsln / lrnwebcomponents / elements / simple-popover / simple-popover.story.js View on Github external
/**
 * 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>

@lrnwebcomponents/absolute-position-behavior

Abstracting the positioning behavior from paper-tooltip to be resusable in other elements

Apache-2.0
Latest version published 7 months ago

Package Health Score

72 / 100
Full package analysis