mirror of
https://github.com/filecoin-project/slate.git
synced 2024-11-22 21:45:56 +03:00
fix(LinkObject): add text ellipses to the tag
This commit is contained in:
parent
a0174ad8f8
commit
005981e48d
@ -3,7 +3,7 @@ import * as Styles from "~/common/styles";
|
||||
import * as Constants from "~/common/constants";
|
||||
import * as Typography from "~/components/system/components/Typography";
|
||||
|
||||
import { H5, P3 } from "~/components/system/components/Typography";
|
||||
import { P3 } from "~/components/system/components/Typography";
|
||||
import { css } from "@emotion/react";
|
||||
import { Logo } from "~/common/logo";
|
||||
|
||||
@ -25,7 +25,7 @@ const STYLES_EMPTY_CONTAINER = css`
|
||||
width: 100%;
|
||||
`;
|
||||
|
||||
export default function LinkObjectPreview({ file }) {
|
||||
export default function LinkObjectPreview({ file, ...props }) {
|
||||
const {
|
||||
data: { link },
|
||||
} = file;
|
||||
@ -40,14 +40,14 @@ export default function LinkObjectPreview({ file }) {
|
||||
css={STYLES_SOURCE_LOGO}
|
||||
/>
|
||||
)}
|
||||
<P3 as="small" color="textGray">
|
||||
<P3 as="small" color="textGray" nbrOflines={1}>
|
||||
{link.source}
|
||||
</P3>
|
||||
</div>
|
||||
);
|
||||
|
||||
return (
|
||||
<ObjectPreviewPrimitive file={file} tag={tag}>
|
||||
<ObjectPreviewPrimitive file={file} tag={tag} {...props}>
|
||||
{link.image ? (
|
||||
<img src={link.image} alt="Link preview" css={Styles.IMAGE_FILL} />
|
||||
) : (
|
||||
|
Loading…
Reference in New Issue
Block a user