UNPKG

@skyra/discord-components-core

Version:

Web components to easily build and display fake Discord messages on your webpages.

6 lines (5 loc) 969 B
import { h } from '@stencil/core'; import Fragment from '../../Fragment'; import VerifiedTick from '../svgs/verified-tick'; export const AuthorInfo = ({ author, bot, server, op, roleColor, roleIcon, roleName, verified, compact }) => (h("span", { class: "discord-author-info" }, !compact && (h(Fragment, null, h("span", { class: "discord-author-username", style: { color: roleColor } }, author), roleIcon && h("img", { class: "discord-author-role-icon", src: roleIcon, height: "20", width: "20", alt: roleName, draggable: false }))), h(Fragment, null, bot && !server && (h("span", { class: "discord-application-tag" }, verified && h(VerifiedTick, null), "Bot")), server && !bot && h("span", { class: "discord-application-tag" }, "Server"), op && h("span", { class: "discord-application-tag discord-application-tag-op" }, "OP")), compact && (h("span", { class: "discord-author-username", style: { color: roleColor } }, author)))); //# sourceMappingURL=author-info.js.map