feat: switch to using MessageProps interface in Message component
This commit is contained in:
parent
4f4063fa88
commit
64b10b48aa
1 changed files with 2 additions and 12 deletions
|
@ -31,19 +31,9 @@
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import DOMPurify from 'dompurify';
|
import DOMPurify from 'dompurify';
|
||||||
import { parse } from 'marked';
|
import { parse } from 'marked';
|
||||||
|
import type { MessageProps } from '~/types/props';
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<MessageProps>();
|
||||||
class?: string,
|
|
||||||
img?: string | null,
|
|
||||||
username: string,
|
|
||||||
text: string,
|
|
||||||
timestamp: number,
|
|
||||||
format: "12" | "24",
|
|
||||||
type: "normal" | "grouped",
|
|
||||||
marginBottom: boolean,
|
|
||||||
last: boolean,
|
|
||||||
messageId: string
|
|
||||||
}>();
|
|
||||||
|
|
||||||
const messageElement = ref<HTMLDivElement>();
|
const messageElement = ref<HTMLDivElement>();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue