Using themed card for ImageCard.

This commit is contained in:
Roland 2022-11-30 20:21:00 -07:00
parent d284419eaf
commit d54b4a23d3
No known key found for this signature in database
GPG key ID: 9D6DBD3ACF11AB93
2 changed files with 14 additions and 12 deletions

View file

@ -2,7 +2,9 @@ import React, {useContext} from "react";
import FileBrowser from 'react-keyed-file-browser';
import {
CardContent,
CardDescription,
CardHeader,
CardMeta,
Confirm,
Divider,
Dropdown,
@ -157,19 +159,19 @@ function ImageCard({file}) {
<ExternalCardLink to={url}>
{poster}
</ExternalCardLink>
<Card.Content {...s}>
<Card.Header>
<CardContent {...s}>
<CardHeader>
<ExternalCardLink to={url} className='no-link-underscore card-link'>
<p>{textEllipsis(file.title || file.stem || file.path, 100)}</p>
</ExternalCardLink>
</Card.Header>
<Card.Meta {...s}>
</CardHeader>
<CardMeta {...s}>
<p>{uploadDate(file.modified / 1000)}</p>
</Card.Meta>
<Card.Description {...s}>
</CardMeta>
<CardDescription {...s}>
<p>{humanFileSize(file.size)}</p>
</Card.Description>
</Card.Content>
</CardDescription>
</CardContent>
</Card>
}

View file

@ -1,7 +1,7 @@
import {Card, PlaceholderImage, PlaceholderLine} from "semantic-ui-react";
import {CardContent, PlaceholderImage, PlaceholderLine} from "semantic-ui-react";
import React, {useContext} from "react";
import {ThemeContext} from "../contexts/contexts";
import {Placeholder} from "./Theme";
import {Card, Placeholder} from "./Theme";
export function CardPlacholder() {
const {s} = useContext(ThemeContext);
@ -10,13 +10,13 @@ export function CardPlacholder() {
<Placeholder>
<PlaceholderImage rectangular/>
</Placeholder>
<Card.Content {...s}>
<CardContent {...s}>
<Placeholder>
<PlaceholderLine/>
<PlaceholderLine/>
<PlaceholderLine/>
</Placeholder>
</Card.Content>
</CardContent>
</Card>
}