2021-06-20 17:09:18 -04:00
|
|
|
import styles from './Embed.module.scss';
|
|
|
|
import IconButton from '../../../ui/IconButton';
|
2021-06-27 06:17:59 -04:00
|
|
|
import { LinkExternal } from '@styled-icons/boxicons-regular';
|
2021-06-20 17:09:18 -04:00
|
|
|
import { EmbedImage } from "revolt.js/dist/api/objects";
|
|
|
|
|
|
|
|
interface Props {
|
|
|
|
embed: EmbedImage;
|
|
|
|
}
|
|
|
|
|
|
|
|
export default function EmbedMediaActions({ embed }: Props) {
|
|
|
|
const filename = embed.url.split('/').pop();
|
|
|
|
|
|
|
|
return (
|
|
|
|
<div className={styles.actions}>
|
|
|
|
<div className={styles.info}>
|
|
|
|
<span className={styles.filename}>{filename}</span>
|
|
|
|
<span className={styles.filesize}>{embed.width + 'x' + embed.height}</span>
|
|
|
|
</div>
|
|
|
|
<a href={embed.url} target="_blank">
|
|
|
|
<IconButton>
|
2021-06-27 06:17:59 -04:00
|
|
|
<LinkExternal size={24} />
|
2021-06-20 17:09:18 -04:00
|
|
|
</IconButton>
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
)
|
|
|
|
}
|