Skip to content
Snippets Groups Projects
Commit 3747f657 authored by Tomáš Havlíček's avatar Tomáš Havlíček
Browse files

feat: finisheed preview page overflow

parent 241150c9
No related branches found
No related tags found
No related merge requests found
import { Card, Carousel, Divider, Image, Space } from "antd"; import {
Card,
Carousel,
Col,
Divider,
Grid,
Image,
Menu,
Row,
Space,
} from "antd";
import Meta from "antd/lib/card/Meta"; import Meta from "antd/lib/card/Meta";
import Title from "antd/lib/skeleton/Title"; import Title from "antd/lib/skeleton/Title";
import React from "react"; import React from "react";
...@@ -237,51 +247,55 @@ export const cardsDataExample2: MovieIO[] = [ ...@@ -237,51 +247,55 @@ export const cardsDataExample2: MovieIO[] = [
]; ];
const Preview: React.FC = () => ( const Preview: React.FC = () => (
<Space className="preview" direction="vertical" style={{display: "flex", paddingTop:"2%"}}> <Space
<Card title="Popular movies" > className="preview"
<Space style={{ display: 'flex', padding: "5 %", justifyContent: "flex-end", width:"fit-content", overflow: "auto"}}> direction="vertical"
style={{ display: "flex", paddingTop: "2%" }}
{cardsDataExample.map((movie) => { >
return ( <Card title="Editor's picks">
<> <Row justify="space-evenly" gutter={50}>
<Link to={`/movie/${movie.id}`}> {cardsDataExample.map((movie) => {
<Card return (
hoverable <Col flex={1}>
style={{ <Link to={`/movie/${movie.id}`}>
width: "240px", <Card
}} hoverable
cover={<img alt={movie.name} src={movie.picture} />} style={{
> width: "240px",
<Meta title={movie.name} description={movie.originalName} /> }}
</Card> cover={<img alt={movie.name} src={movie.picture} />}
</Link> >
</> <Meta title={movie.name} description={movie.originalName} />
); </Card>
})} </Link>
</Space> </Col>
);
})}
</Row>
</Card> </Card>
<Divider/> <Divider />
<Card title="Recent movies" > <Card title="Recent movies">
<Space style={{ display: 'flex', padding: "5 %", justifyContent: "flex-end", width:"fit-content", overflow: "auto"}}> <Row justify="space-evenly" gutter={50}>
{cardsDataExample2.map((movie) => { {cardsDataExample.map((movie) => {
return ( return (
<> <Col flex={1} style={{display: "flex"}}>
<Link to={`/movie/${movie.id}`}> <Link to={`/movie/${movie.id}`} style={{alignSelf: "center"}}>
<Card <Card
hoverable hoverable
style={{ style={{
width: 240, width: "240px",
}} alignSelf: "center",
cover={<img alt={movie.name} src={movie.picture} />} }}
> cover={<img alt={movie.name} src={movie.picture} />}
<Meta title={movie.name} description={movie.originalName} /> >
</Card> <Meta title={movie.name} description={movie.originalName} />
</Link> </Card>
</> </Link>
); </Col>
})} );
</Space> })}
</Row>
</Card> </Card>
</Space> </Space>
); );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment