How to use the interweave-emoji.EmojiMatcher function in interweave-emoji

To help you get started, we’ve selected a few interweave-emoji examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github airbnb / lunar / packages / core / src / components / Interweave / index.tsx View on Github external
enlargeThreshold: 3,
};

export const urlMatcher = new UrlMatcher(
  'url',
  {
    customTLDs: ['tools'],
  },
  UrlFactory,
);

export const emailMatcher = new EmailMatcher('email', {}, EmailFactory);

export const emojiMatcher = new EmojiMatcher('emoji', emojiOptions);

export const emojiMatcherWithEmoticons = new EmojiMatcher('emoji', {
  ...emojiOptions,
  convertEmoticon: true,
});

export type Props = BaseInterweaveProps & {
  /** Render any found links using large prop. */
  large?: boolean;
  /** Only run these matchers (by name). */
  onlyMatchers?: string[];
  /** Render any found links using small prop. */
  small?: boolean;
  /** Convert emoticons to emojis. */
  withEmoticons?: boolean;
};

/**
github airbnb / lunar / packages / core / src / components / Interweave / index.tsx View on Github external
convertShortcode: true,
  convertUnicode: true,
  enlargeThreshold: 3,
};

export const urlMatcher = new UrlMatcher(
  'url',
  {
    customTLDs: ['tools'],
  },
  UrlFactory,
);

export const emailMatcher = new EmailMatcher('email', {}, EmailFactory);

export const emojiMatcher = new EmojiMatcher('emoji', emojiOptions);

export const emojiMatcherWithEmoticons = new EmojiMatcher('emoji', {
  ...emojiOptions,
  convertEmoticon: true,
});

export type Props = BaseInterweaveProps & {
  /** Render any found links using large prop. */
  large?: boolean;
  /** Only run these matchers (by name). */
  onlyMatchers?: string[];
  /** Render any found links using small prop. */
  small?: boolean;
  /** Convert emoticons to emojis. */
  withEmoticons?: boolean;
};