UNPKG

gd-sprest-bs

Version:

SharePoint JavaScript, TypeScript and Web Components designed using the Bootstrap framework.

20 lines (19 loc) 699 B
import { Components } from "../components/core"; import { _Dropdown } from "./dropdown"; /** * Dropdown Button */ class _DropdownButton extends _Dropdown { // Override the rendering method to customize the type onRendering(props) { // Set the type and placement props.placeholder = this.config.placeholder; props.placement = this.config.placement || Components.DropdownPlacements.Left; props.type = Components.FormControlTypes.DropdownButton; // Return the props return props; } } export const DropdownButton = (targetProperty, config, context) => { return new _DropdownButton(targetProperty, config, context); };