mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-12-05 06:09:57 -05:00
Centering card groups on mobile.
This commit is contained in:
parent
723d9863bf
commit
8d93268552
3 changed files with 22 additions and 13 deletions
|
|
@ -147,11 +147,11 @@ export function VideoCard({video}) {
|
|||
|
||||
export function VideoCards({videos}) {
|
||||
return (
|
||||
<Card.Group>
|
||||
<CardGroupCentered>
|
||||
{videos.map((v) => {
|
||||
return <VideoCard key={v['id']} video={v}/>
|
||||
})}
|
||||
</Card.Group>
|
||||
</CardGroupCentered>
|
||||
)
|
||||
}
|
||||
|
||||
|
|
@ -506,14 +506,6 @@ export function changePageHistory(history, location, activePage, searchStr, sear
|
|||
scrollToTop();
|
||||
}
|
||||
|
||||
export function objectToQuery(d) {
|
||||
// Return an HTTP query string based on the provided dictionary.
|
||||
// Do not include key/values when the value is null if noNull=true
|
||||
let arr = Object.keys(d).map((k) => d[k] === null ? '' : `${k}=${d[k]}`);
|
||||
arr = arr.filter((i) => i !== '')
|
||||
return arr.join('&');
|
||||
}
|
||||
|
||||
export function ClearButton({onClick, style, label, icon = 'close'}) {
|
||||
return <Button icon
|
||||
labelPosition='right'
|
||||
|
|
@ -669,3 +661,20 @@ export function PageContainer(props) {
|
|||
</>
|
||||
)
|
||||
}
|
||||
|
||||
export function CardGroupCentered(props) {
|
||||
return (
|
||||
<>
|
||||
<Responsive minWidth={770}>
|
||||
<Card.Group>
|
||||
{props.children}
|
||||
</Card.Group>
|
||||
</Responsive>
|
||||
<Responsive maxWidth={769}>
|
||||
<Card.Group centered>
|
||||
{props.children}
|
||||
</Card.Group>
|
||||
</Responsive>
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue