How to use the hig-vanilla.Flyout.AvailableAnchorPoints function in hig-vanilla

To help you get started, we’ve selected a few hig-vanilla 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 Autodesk / hig / packages / react / src / adapters / FlyoutAdapter.js View on Github external
{...adapterProps}
          />
          
            {props.children}
          
          
            {props.content}
          
        
      )}
    
  );
}

FlyoutAdapter.propTypes = {
  anchorPoint: PropTypes.oneOf(VanillaFlyout.AvailableAnchorPoints),
  onClickOutside: PropTypes.func,
  onScroll: PropTypes.func,
  open: PropTypes.bool,
  content: PropTypes.node,
  children: PropTypes.node,
  maxHeight: PropTypes.number
};

FlyoutAdapter.defaultProps = {
  anchorPoint: undefined,
  onClickOutside: () => {},
  onScroll: () => {},
  open: undefined,
  content: undefined,
  children: undefined
};
github Autodesk / hig / packages / react / src / elements / components / Flyout.js View on Github external
open={this.state.open}
        onClickOutside={this.closeFlyout}
        content={this.props.content}
        maxHeight={this.props.maxHeight}
      >
        {target}
      
    );
  }
}

Flyout.propTypes = {
  /**
   * Where the flyout will be anchored relative to target
   */
  anchorPoint: PropTypes.oneOf(VanillaFlyout.AvailableAnchorPoints),
  /**
   * Target component to open the flyout
   */
  children: PropTypes.node,
  /**
   * Content for the flyout
   */
  content: PropTypes.node,
  /**
   * Max height of the flyout content, in pixels
   */
  maxHeight: PropTypes.number
};