1
0
mirror of https://github.com/phuoc-ng/csslayout.git synced 2025-08-24 14:42:47 +02:00

Add split navigation

This commit is contained in:
Phuoc Nguyen
2019-11-22 11:46:02 +07:00
parent a9f65f43cc
commit 370ad06c88
4 changed files with 85 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
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 w-80 b--black-30 ba br2 pa1">
<div className="w1 mr1"><Rectangle /></div>
<div className="w1 mr1"><Rectangle /></div>
<div className="w1 ml-auto"><Rectangle /></div>
</div>
</div>
</Frame>
);
};
export default Cover;

View File

@@ -0,0 +1,56 @@
import React from 'react';
import DetailsLayout from '../../DetailsLayout';
import BrowserFrame from '../../placeholders/BrowserFrame';
import Rectangle from '../../placeholders/Rectangle';
import SampleCode from '../../SampleCode';
const Details = () => {
return (
<DetailsLayout title="Split navigation">
<BrowserFrame
content={
<div className="h-100 flex flex-column items-center justify-center">
<ul className="list ma0 b--black-30 ba br3 flex items-center pa3 w-60">
<li className="w-20 mr1"><Rectangle /></li>
<li className="w-10 mr1"><Rectangle /></li>
<li className="w-20 mr1"><Rectangle /></li>
<li className="w-10 ml-auto"><Rectangle /></li>
</ul>
</div>
}
source={
<SampleCode
lang="html"
code={`
<ul style="
/* Content is centered horizontally */
align-items: center;
display: flex;
/* Reset styles */
list-stype-type: none;
margin: 0;
">
<!-- Navigation item -->
<li>
<a href="">...</a>
</li>
<!-- Navigation item that sticks to the right -->
<li style="
/* Sticks to the right */
margin-left: auto;
">
<a href="">...</a>
</li>
</ul>
`}
/>
}
/>
</DetailsLayout>
);
};
export default Details;