Use Discord Icons

This commit is contained in:
thororen1234 2025-01-29 16:41:53 -05:00
parent 3b2d43e682
commit 50f9c60d55
8 changed files with 23 additions and 112 deletions

View file

@ -18,11 +18,10 @@
import { EquicordDevs } from "@utils/constants";
import definePlugin from "@utils/types";
import { findComponentByCodeLazy } from "@webpack";
import { Message } from "discord-types/general";
function PinIcon({ style = {} }) {
return <svg className="icon__9293f" aria-hidden="true" role="img" xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 24 24"><path fill="currentColor" d="M19.38 11.38a3 3 0 0 0 4.24 0l.03-.03a.5.5 0 0 0 0-.7L13.35.35a.5.5 0 0 0-.7 0l-.03.03a3 3 0 0 0 0 4.24L13 5l-2.92 2.92-3.65-.34a2 2 0 0 0-1.6.58l-.62.63a1 1 0 0 0 0 1.42l9.58 9.58a1 1 0 0 0 1.42 0l.63-.63a2 2 0 0 0 .58-1.6l-.34-3.64L19 11l.38.38ZM9.07 17.07a.5.5 0 0 1-.08.77l-5.15 3.43a.5.5 0 0 1-.63-.06l-.42-.42a.5.5 0 0 1-.06-.63L6.16 15a.5.5 0 0 1 .77-.08l2.14 2.14Z" style={style}></path></svg>;
}
const PinIcon = findComponentByCodeLazy("1-.06-.63L6.16");
export default definePlugin({
name: "PinIcon",
description: "Adds a pin icon to pinned messages",
@ -37,6 +36,6 @@ export default definePlugin({
}
],
PinnedIcon({ pinned }: Message) {
return pinned ? (<PinIcon style={{ position: "absolute", right: "0", top: "0" }} />) : null;
return pinned ? (<PinIcon size="xs" style={{ position: "absolute", right: "0", top: "0" }} />) : null;
}
});