import * as React from "react"; import {ReactComponentBase} from "tc-shared/ui/react-elements/ReactComponentBase"; import {IconRenderer, RemoteIconRenderer} from "tc-shared/ui/react-elements/Icon"; import {getIconManager, RemoteIconInfo} from "tc-shared/file/Icons"; const cssStyle = require("./Button.scss"); export interface DropdownEntryProperties { icon?: string | RemoteIconInfo; text: JSX.Element | string; onClick?: (event: React.MouseEvent) => void; onAuxClick?: (event: React.MouseEvent) => void; onContextMenu?: (event: React.MouseEvent) => void; children?: React.ReactElement[] } const LocalIconRenderer = (props: { icon?: string | RemoteIconInfo }) => { if(!props.icon || typeof props.icon === "string") { return } else { return ; } } export class DropdownEntry extends ReactComponentBase { protected defaultState() { return {}; } render() { if(this.props.children) { return (
{this.props.text}
{this.props.children}
); } else { return ( ); } } } export const DropdownContainer = (props: { children: any }) => (
{props.children}
);