mirror of
https://github.com/phuoc-ng/csslayout.git
synced 2025-08-06 14:16:50 +02:00
Add feature list
This commit is contained in:
@@ -7,6 +7,7 @@ import Breadcrumb from './layouts/breadcrumb/Details';
|
||||
import ButtonWithIcon from './layouts/button-with-icon/Details';
|
||||
import Card from './layouts/card/Details';
|
||||
import Centering from './layouts/centering/Details';
|
||||
import FeatureList from './layouts/feature-list/Details';
|
||||
import FixedAtCorner from './layouts/fixed-at-corner/Details';
|
||||
import HolyGrail from './layouts/holy-grail/Details';
|
||||
import InputAddon from './layouts/input-add-on/Details';
|
||||
@@ -38,6 +39,7 @@ const App = () => {
|
||||
<Route exact={true} path='/button-with-icon'><ButtonWithIcon /></Route>
|
||||
<Route exact={true} path='/card'><Card /></Route>
|
||||
<Route exact={true} path='/centering'><Centering /></Route>
|
||||
<Route exact={true} path='/feature-list'><FeatureList /></Route>
|
||||
<Route exact={true} path='/fixed-at-corner'><FixedAtCorner /></Route>
|
||||
<Route exact={true} path='/holy-grail'><HolyGrail /></Route>
|
||||
<Route exact={true} path='/input-add-on'><InputAddon /></Route>
|
||||
|
@@ -6,6 +6,7 @@ import BreadcrumbCover from './layouts/breadcrumb/Cover';
|
||||
import ButtonWithIconCover from './layouts/button-with-icon/Cover';
|
||||
import CardCover from './layouts/card/Cover';
|
||||
import CenterCover from './layouts/centering/Cover';
|
||||
import FeatureListCover from './layouts/feature-list/Cover';
|
||||
import FixedAtCornerCover from './layouts/fixed-at-corner/Cover';
|
||||
import HolyGrailCover from './layouts/holy-grail/Cover';
|
||||
import InputAddonCover from './layouts/input-add-on/Cover';
|
||||
@@ -137,6 +138,12 @@ const Home = () => {
|
||||
<h4 className="f5 mv0 pt3">Centering</h4>
|
||||
</Link>
|
||||
</div>
|
||||
<div className="pa1 w-20">
|
||||
<Link to="/feature-list" className="link flex flex-column items-center justify-center tc hover-bg-black-10 br2 pa3">
|
||||
<FeatureListCover />
|
||||
<h4 className="f5 mv0 pt3">Feature list</h4>
|
||||
</Link>
|
||||
</div>
|
||||
<div className="pa1 w-20">
|
||||
<Link to="/fixed-at-corner" className="link flex flex-column items-center justify-center tc hover-bg-black-10 br2 pa3">
|
||||
<FixedAtCornerCover />
|
||||
|
35
client/layouts/feature-list/Cover.jsx
Normal file
35
client/layouts/feature-list/Cover.jsx
Normal file
@@ -0,0 +1,35 @@
|
||||
import React from 'react';
|
||||
|
||||
import Circle from '../../placeholders/Circle';
|
||||
import Frame from '../../placeholders/Frame';
|
||||
import Line from '../../placeholders/Line';
|
||||
import Rectangle from '../../placeholders/Rectangle';
|
||||
|
||||
const Cover = () => {
|
||||
return (
|
||||
<Frame>
|
||||
<div className="flex flex-column justify-center h-100 pa2 w-100">
|
||||
<div className="flex w-100 mb2">
|
||||
<div className="mh1"><Circle size={32} /></div>
|
||||
<div style={{ flex: 1 }}>
|
||||
<div className="w-100 mb2"><Rectangle height={4} /></div>
|
||||
<div className="w-100 mb1"><Line /></div>
|
||||
<div className="w-100 mb1"><Line /></div>
|
||||
<div className="w-80"><Line /></div>
|
||||
</div>
|
||||
</div>
|
||||
<div className="flex w-100 flex-row-reverse">
|
||||
<div className="mh1"><Circle size={32} /></div>
|
||||
<div style={{ flex: 1 }}>
|
||||
<div className="w-100 mb2"><Rectangle height={4} /></div>
|
||||
<div className="w-100 mb1"><Line /></div>
|
||||
<div className="w-100 mb1"><Line /></div>
|
||||
<div className="w-80"><Line /></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</Frame>
|
||||
);
|
||||
};
|
||||
|
||||
export default Cover;
|
75
client/layouts/feature-list/Details.jsx
Normal file
75
client/layouts/feature-list/Details.jsx
Normal file
@@ -0,0 +1,75 @@
|
||||
import React from 'react';
|
||||
|
||||
import DetailsLayout from '../../DetailsLayout';
|
||||
import Block from '../../placeholders/Block';
|
||||
import BrowserFrame from '../../placeholders/BrowserFrame';
|
||||
import Circle from '../../placeholders/Circle';
|
||||
import Rectangle from '../../placeholders/Rectangle';
|
||||
|
||||
import SampleCode from '../../SampleCode';
|
||||
|
||||
const Details = () => {
|
||||
return (
|
||||
<DetailsLayout title="Feature list">
|
||||
<BrowserFrame
|
||||
content={
|
||||
<div className="flex h-100 items-center justify-center">
|
||||
<div className="w-60">
|
||||
<div className="flex flex-row mb4">
|
||||
<div className="mh3"><Circle size={128} /></div>
|
||||
<div style={{ flex: 1 }}>
|
||||
<div className="mb4"><Rectangle height={8} /></div>
|
||||
<Block numberOfBlocks={10} />
|
||||
</div>
|
||||
</div>
|
||||
<div className="flex flex-row flex-row-reverse mb4">
|
||||
<div className="mh3"><Circle size={128} /></div>
|
||||
<div style={{ flex: 1 }}>
|
||||
<div className="mb4"><Rectangle height={8} /></div>
|
||||
<Block numberOfBlocks={15} />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
source={
|
||||
<SampleCode
|
||||
lang="html"
|
||||
code={`
|
||||
<!-- Feature item -->
|
||||
<div style="
|
||||
display: flex;
|
||||
|
||||
/* OPTIONAL: Reverse the order of image and content */
|
||||
flex-direction: row-reverse;
|
||||
|
||||
/* OPTIONAL: Spacing between items */
|
||||
margin: 16px 0;
|
||||
">
|
||||
<!-- Image -->
|
||||
<div style="
|
||||
width: 128px;
|
||||
">
|
||||
...
|
||||
</div>
|
||||
|
||||
<!-- Right side -->
|
||||
<div style="
|
||||
/* Take the remaining width */
|
||||
flex: 1;
|
||||
">
|
||||
...
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Repeated items -->
|
||||
...
|
||||
`}
|
||||
/>
|
||||
}
|
||||
/>
|
||||
</DetailsLayout>
|
||||
);
|
||||
};
|
||||
|
||||
export default Details;
|
Reference in New Issue
Block a user