mirror of
https://github.com/revoltchat/revite.git
synced 2024-11-14 11:15:02 -05:00
d829deba98
- Image embeds actions now use a better styling that's the same as the other action stylings
28 lines
826 B
TypeScript
28 lines
826 B
TypeScript
import { LinkExternal } from "@styled-icons/boxicons-regular";
|
|
import { EmbedImage } from "revolt.js/dist/api/objects";
|
|
|
|
import styles from "./Embed.module.scss";
|
|
|
|
import IconButton from "../../../ui/IconButton";
|
|
|
|
interface Props {
|
|
embed: EmbedImage;
|
|
}
|
|
|
|
export default function EmbedMediaActions({ embed }: Props) {
|
|
const filename = embed.url.split("/").pop();
|
|
|
|
return (
|
|
<div className={styles.actions}>
|
|
<span className={styles.filename}>{filename}</span>
|
|
<span className={styles.filesize}>
|
|
{embed.width + "x" + embed.height}
|
|
</span>
|
|
<a href={embed.url} class={styles.openIcon} target="_blank">
|
|
<IconButton>
|
|
<LinkExternal size={24} />
|
|
</IconButton>
|
|
</a>
|
|
</div>
|
|
);
|
|
}
|