Tidy up + add support for floating emoji.

This commit is contained in:
Half-Shot
2024-11-01 15:27:20 +00:00
parent fd46f8ad46
commit dfe9569720
8 changed files with 64 additions and 27 deletions

View File

@@ -6,11 +6,9 @@ Please see LICENSE in the repository root for full details.
*/
import { ReactNode, useEffect, useState } from "react";
import classNames from "classnames";
import "@formatjs/intl-durationformat/polyfill";
import { DurationFormat } from "@formatjs/intl-durationformat";
import styles from "./RaisedHandIndicator.module.css";
import { ReactionIndicator } from "./ReactionIndicator";
const durationFormatter = new DurationFormat(undefined, {

View File

@@ -9,7 +9,7 @@ import { PropsWithChildren, ReactNode } from "react";
import classNames from "classnames";
import "@formatjs/intl-durationformat/polyfill";
import styles from "./RaisedHandIndicator.module.css";
import styles from "./ReactionIndicator.module.css";
export function ReactionIndicator({
emoji,

View File

@@ -1,3 +1,12 @@
/*
Copyright 2024 New Vector Ltd.
SPDX-License-Identifier: AGPL-3.0-only
Please see LICENSE in the repository root for full details.
*/
import { RelationType } from "matrix-js-sdk/src/types";
import catSoundOgg from "../sound/reactions/cat.mp3?url";
import catSoundMp3 from "../sound/reactions/cat.mp3?url";
import cricketsSoundOgg from "../sound/reactions/crickets.mp3?url";
@@ -8,7 +17,7 @@ import genericSoundOgg from "../sound/reactions/generic.mp3?url";
import genericSoundMp3 from "../sound/reactions/generic.mp3?url";
import lightbulbSoundOgg from "../sound/reactions/lightbulb.mp3?url";
import lightbulbSoundMp3 from "../sound/reactions/lightbulb.mp3?url";
import { RelationType } from "matrix-js-sdk/src/types";
export interface ReactionOption {
emoji: string;