1
0
mirror of https://github.com/phuoc-ng/csslayout.git synced 2025-08-21 21:26:15 +02:00

Add Previous and next buttons

This commit is contained in:
Phuoc Nguyen
2019-11-17 14:25:01 +07:00
parent 3cc79a8266
commit 8f2954c245
4 changed files with 89 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
import React from 'react';
import Frame from '../../placeholders/Frame';
import Rectangle from '../../placeholders/Rectangle';
const Cover = () => {
return (
<Frame>
<div className="h-100 flex flex-column items-center justify-center">
<div className="flex items-center justify-between pa2 w-100">
<div className="b--black-30 ba br2 flex flex-row items-center pa1 w-40">
<div className="mr1">&lt;</div>
<Rectangle />
</div>
<div className="b--black-30 ba br2 flex flex-row items-center pa1 w-40">
<Rectangle />
<div className="ml1">&gt;</div>
</div>
</div>
</div>
</Frame>
);
};
export default Cover;

View File

@@ -0,0 +1,55 @@
import React from 'react';
import DetailsLayout from '../../DetailsLayout';
import BrowserFrame from '../../placeholders/BrowserFrame';
import Rectangle from '../../placeholders/Rectangle';
import SampleCode from '../../SampleCode';
import useDocumentTitle from '../../useDocumentTitle';
const Details = () => {
useDocumentTitle('CSS Layout ∙ Previous and next buttons');
return (
<DetailsLayout>
<h1 className="f1 tc">Previous and next buttons</h1>
<BrowserFrame
content={
<div className="h-100 flex flex-column items-center justify-center">
<div className="w-50">
<div className="flex items-center justify-between pa2 w-100 h2">
<a className="b--black-30 ba br2 flex flex-row pa2 items-center w-30">
<div className="mr2">&lt;</div>
<Rectangle />
</a>
<a className="b--black-30 ba br2 flex flex-row pa2 items-center w-30">
<Rectangle />
<div className="ml2">&gt;</div>
</a>
</div>
</div>
</div>
}
source={
<SampleCode
lang="html"
code={`
<div style="
align-items: center;
display: flex;
justify-content: space-between;
">
<!-- Previous link sticks to the left -->
<a>..</a>
<!-- Next link sticks to the right -->
<a>..</a>
</div>
`}
/>
}
/>
</DetailsLayout>
);
};
export default Details;