UNPKG

sws-frontend

Version:

sws frontend project

41 lines (40 loc) 1.22 kB
/// <reference types="react-bootstrap" /> /// <reference types="react" /> import * as React from "react"; import { FormControlProps } from "react-bootstrap"; import './mentionfield.scss'; export declare type MentionType = { id: string; display: string; type: string; value?: any; }; export declare type MentionProps = { withMention?: boolean; mentions?: MentionType[]; markup?: string; mentionsTypes?: string[]; displayTransform?: any; renderSuggestion?: any; }; export declare type RegexSubstitution = { regex: RegExp; substitution: string; }; export declare type MentionFieldProps = MentionProps & FormControlProps & { className?: string; style?: any; disabled?: boolean; }; export declare type State = { typing: boolean; }; declare class MentionField extends React.Component<MentionFieldProps, State> { constructor(p: MentionFieldProps); onChange(e: any): void; displayTransform(id: any, display: any, type: any): string; renderSuggestion(suggestion: any, search: any, highlightedDisplay: any): JSX.Element; filterParams(query: string, type: string, mentions: any): any; render(): JSX.Element; } export default MentionField;