UNPKG

@mtg-rio/mui-mentions

Version:

@mention people in a MUI TextField

18 lines 911 B
/** The default trigger used to show the suggestions overlay. */ export const DefaultTrigger = '@'; /** The default markup template used if a {@link SuggestionDataSource} does not provide one. */ export const DefaultMarkupTemplate = '@[__display__](__id__)'; /** * Returns the default display string for the given suggestion. * @param id The id of the suggestion to get the display string for. * @param display The default display string of the suggestion. * @param convertSpaces Whether to convert spaces to no-break spaces (Ex: for multiline mode). * @returns The default display string for the suggestion. */ export function DefaultDisplayTransform(id, display, convertSpaces) { if (!convertSpaces) { return display || id; } return (display === null || display === void 0 ? void 0 : display.replace(/ /g, '\u00A0')) || id.replace(/ /g, '\u00A0'); } //# sourceMappingURL=types.js.map