@react-md/menu
Version:
Create menus that auto-position themselves within the viewport and adhere to the accessibility guidelines
13 lines • 714 B
JavaScript
/* eslint-disable react/prop-types */
import React from "react";
import { IconRotator, TextIconSpacing } from "@react-md/icon";
import { bem } from "@react-md/utils";
var block = bem("rmd-menu-icon");
export function ToggleChildren(_a) {
var dropdownIcon = _a.dropdownIcon, disableDropdownIcon = _a.disableDropdownIcon, children = _a.children, visible = _a.visible;
if (disableDropdownIcon || !dropdownIcon) {
return React.createElement(React.Fragment, null, children);
}
return (React.createElement(TextIconSpacing, { icon: React.createElement(IconRotator, { rotated: visible, className: block() }, dropdownIcon), iconAfter: true }, children));
}
//# sourceMappingURL=ToggleChildren.js.map