mirror of
https://github.com/phuoc-ng/csslayout.git
synced 2025-08-06 22:26:33 +02:00
Add pricing table
This commit is contained in:
@@ -16,6 +16,7 @@ import Modal from './layouts/modal/Details';
|
|||||||
import Notification from './layouts/notification/Details';
|
import Notification from './layouts/notification/Details';
|
||||||
import Pagination from './layouts/pagination/Details';
|
import Pagination from './layouts/pagination/Details';
|
||||||
import PreviousNextButtons from './layouts/previous-next-buttons/Details';
|
import PreviousNextButtons from './layouts/previous-next-buttons/Details';
|
||||||
|
import PricingTable from './layouts/pricing-table/Details';
|
||||||
import ProgressBar from './layouts/progress-bar/Details';
|
import ProgressBar from './layouts/progress-bar/Details';
|
||||||
import SameHeightColumns from './layouts/same-height-columns/Details';
|
import SameHeightColumns from './layouts/same-height-columns/Details';
|
||||||
import Sidebar from './layouts/sidebar/Details';
|
import Sidebar from './layouts/sidebar/Details';
|
||||||
@@ -45,6 +46,7 @@ const App = () => {
|
|||||||
<Route exact={true} path='/notification'><Notification /></Route>
|
<Route exact={true} path='/notification'><Notification /></Route>
|
||||||
<Route exact={true} path='/pagination'><Pagination /></Route>
|
<Route exact={true} path='/pagination'><Pagination /></Route>
|
||||||
<Route exact={true} path='/previous-next-buttons'><PreviousNextButtons /></Route>
|
<Route exact={true} path='/previous-next-buttons'><PreviousNextButtons /></Route>
|
||||||
|
<Route exact={true} path='/pricing-table'><PricingTable /></Route>
|
||||||
<Route exact={true} path='/progress-bar'><ProgressBar /></Route>
|
<Route exact={true} path='/progress-bar'><ProgressBar /></Route>
|
||||||
<Route exact={true} path='/same-height-columns'><SameHeightColumns /></Route>
|
<Route exact={true} path='/same-height-columns'><SameHeightColumns /></Route>
|
||||||
<Route exact={true} path='/sidebar'><Sidebar /></Route>
|
<Route exact={true} path='/sidebar'><Sidebar /></Route>
|
||||||
|
@@ -15,6 +15,7 @@ import ModalCover from './layouts/modal/Cover';
|
|||||||
import NotificationCover from './layouts/notification/Cover';
|
import NotificationCover from './layouts/notification/Cover';
|
||||||
import PaginationCover from './layouts/pagination/Cover';
|
import PaginationCover from './layouts/pagination/Cover';
|
||||||
import PreviousNextButtonCover from './layouts/previous-next-buttons/Cover';
|
import PreviousNextButtonCover from './layouts/previous-next-buttons/Cover';
|
||||||
|
import PricingTableCover from './layouts/pricing-table/Cover';
|
||||||
import ProgressBarCover from './layouts/progress-bar/Cover';
|
import ProgressBarCover from './layouts/progress-bar/Cover';
|
||||||
import SameHeightColumnsCover from './layouts/same-height-columns/Cover';
|
import SameHeightColumnsCover from './layouts/same-height-columns/Cover';
|
||||||
import SidebarCover from './layouts/sidebar/Cover';
|
import SidebarCover from './layouts/sidebar/Cover';
|
||||||
@@ -163,6 +164,12 @@ const Home = () => {
|
|||||||
<h4 className="f5 mv0 pt3">Previous next buttons</h4>
|
<h4 className="f5 mv0 pt3">Previous next buttons</h4>
|
||||||
</Link>
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
|
<div className="pa1 w-20">
|
||||||
|
<Link to="/pricing-table" className="link flex flex-column items-center justify-center tc hover-bg-black-10 br2 pa3">
|
||||||
|
<PricingTableCover />
|
||||||
|
<h4 className="f5 mv0 pt3">Pricing table</h4>
|
||||||
|
</Link>
|
||||||
|
</div>
|
||||||
<div className="pa1 w-20">
|
<div className="pa1 w-20">
|
||||||
<Link to="/progress-bar" className="link flex flex-column items-center justify-center tc hover-bg-black-10 br2 pa3">
|
<Link to="/progress-bar" className="link flex flex-column items-center justify-center tc hover-bg-black-10 br2 pa3">
|
||||||
<ProgressBarCover />
|
<ProgressBarCover />
|
||||||
|
45
client/layouts/pricing-table/Cover.jsx
Normal file
45
client/layouts/pricing-table/Cover.jsx
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
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="h-100 flex items-center justify-center ph2">
|
||||||
|
<div className="ba br2 b--black-30 flex flex-column items-center justify-center pa1 mr1" style={{ flex: 1 }}>
|
||||||
|
<div className="mb1"><Circle /></div>
|
||||||
|
<div className="mb1 w-100">
|
||||||
|
<div className="w-100 mb1"><Line /></div>
|
||||||
|
<div className="w-100 mb1"><Line /></div>
|
||||||
|
<div className="w-80"><Line /></div>
|
||||||
|
</div>
|
||||||
|
<Rectangle />
|
||||||
|
</div>
|
||||||
|
<div className="ba br2 b--black-30 flex flex-column items-center justify-center pa1 mr1" style={{ flex: 1 }}>
|
||||||
|
<div className="mb1"><Circle /></div>
|
||||||
|
<div className="mb1 w-100">
|
||||||
|
<div className="w-100 mb1"><Line /></div>
|
||||||
|
<div className="w-60 mb1"><Line /></div>
|
||||||
|
<div className="w-80 mb1"><Line /></div>
|
||||||
|
<div className="w-100 mb1"><Line /></div>
|
||||||
|
<div className="w-80"><Line /></div>
|
||||||
|
</div>
|
||||||
|
<Rectangle />
|
||||||
|
</div>
|
||||||
|
<div className="ba br2 b--black-30 flex flex-column items-center justify-center pa1" style={{ flex: 1 }}>
|
||||||
|
<div className="mb1"><Circle /></div>
|
||||||
|
<div className="mb1 w-100">
|
||||||
|
<div className="w-100 mb1"><Line /></div>
|
||||||
|
<div className="w-80"><Line /></div>
|
||||||
|
</div>
|
||||||
|
<Rectangle />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</Frame>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default Cover;
|
100
client/layouts/pricing-table/Details.jsx
Normal file
100
client/layouts/pricing-table/Details.jsx
Normal file
@@ -0,0 +1,100 @@
|
|||||||
|
import React from 'react';
|
||||||
|
|
||||||
|
import DetailsLayout from '../../DetailsLayout';
|
||||||
|
import Circle from '../../placeholders/Circle';
|
||||||
|
import Block from '../../placeholders/Block';
|
||||||
|
import BrowserFrame from '../../placeholders/BrowserFrame';
|
||||||
|
import Rectangle from '../../placeholders/Rectangle';
|
||||||
|
import SampleCode from '../../SampleCode';
|
||||||
|
import useDocumentTitle from '../../hooks/useDocumentTitle';
|
||||||
|
|
||||||
|
const Details = () => {
|
||||||
|
useDocumentTitle('CSS Layout ∙ Pricing table');
|
||||||
|
|
||||||
|
return (
|
||||||
|
<DetailsLayout>
|
||||||
|
<h1 className="f1 tc">Pricing table</h1>
|
||||||
|
<BrowserFrame
|
||||||
|
content={
|
||||||
|
<div className="h-100 flex items-center justify-center pa3">
|
||||||
|
<div className="w-60 flex items-center justify-center">
|
||||||
|
<div className="ba br2 b--black-30 flex flex-column items-center justify-center pa3 mh2" style={{ flex: 1 }}>
|
||||||
|
<div className="mb3 w-60"><Rectangle /></div>
|
||||||
|
<div className="mb3"><Circle size={64} /></div>
|
||||||
|
<div className="mb3 w-100">
|
||||||
|
<Block numberOfBlocks={10} />
|
||||||
|
</div>
|
||||||
|
<div className="w-40"><Rectangle height={32} /></div>
|
||||||
|
</div>
|
||||||
|
<div className="ba br2 b--black-30 flex flex-column items-center justify-center pa3 mh2" style={{ flex: 1 }}>
|
||||||
|
<div className="mb3 w-60"><Rectangle /></div>
|
||||||
|
<div className="mb3"><Circle size={64} /></div>
|
||||||
|
<div className="mb3 w-100">
|
||||||
|
<Block numberOfBlocks={20} />
|
||||||
|
</div>
|
||||||
|
<div className="w-40"><Rectangle height={32} /></div>
|
||||||
|
</div>
|
||||||
|
<div className="ba br2 b--black-30 flex flex-column items-center justify-center pa3 mh2" style={{ flex: 1 }}>
|
||||||
|
<div className="mb3 w-60"><Rectangle /></div>
|
||||||
|
<div className="mb3"><Circle size={64} /></div>
|
||||||
|
<div className="mb3 w-100">
|
||||||
|
<Block numberOfBlocks={10} />
|
||||||
|
</div>
|
||||||
|
<div className="w-40"><Rectangle height={32} /></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
source={
|
||||||
|
<SampleCode
|
||||||
|
lang="html"
|
||||||
|
code={`
|
||||||
|
<div style="
|
||||||
|
/* Content is centered horizontally */
|
||||||
|
align-items: center;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
">
|
||||||
|
<!-- Pricing column -->
|
||||||
|
<div style="
|
||||||
|
/* Content is centered vertically */
|
||||||
|
align-items: center;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: center;
|
||||||
|
|
||||||
|
/* Make all columns have the same width */
|
||||||
|
flex: 1;
|
||||||
|
|
||||||
|
/* OPTIONAL: Space between columns */
|
||||||
|
margin: 0 8px;
|
||||||
|
|
||||||
|
/* OPTIONAL: Border */
|
||||||
|
border: 1px solid rgba(0, 0, 0, 0.3);
|
||||||
|
border-radius: 4px;
|
||||||
|
">
|
||||||
|
<!-- Title -->
|
||||||
|
...
|
||||||
|
|
||||||
|
<!-- Price -->
|
||||||
|
...
|
||||||
|
|
||||||
|
<!-- Description -->
|
||||||
|
...
|
||||||
|
|
||||||
|
<!-- Button -->
|
||||||
|
...
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Repeated pricing columns -->
|
||||||
|
...
|
||||||
|
</div>
|
||||||
|
`}
|
||||||
|
/>
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
</DetailsLayout>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default Details;
|
@@ -7,7 +7,7 @@ const Cover = () => {
|
|||||||
<Frame>
|
<Frame>
|
||||||
<div className="h-100 flex flex-column items-center justify-center pa2">
|
<div className="h-100 flex flex-column items-center justify-center pa2">
|
||||||
<div className="h1 w-100 br-pill bg-black-10 pa1">
|
<div className="h1 w-100 br-pill bg-black-10 pa1">
|
||||||
<div className="w-40 br-pill h-100 bg-blue" />
|
<div className="w-40 br-pill h-100 bg-black-30" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</Frame>
|
</Frame>
|
||||||
|
@@ -6,7 +6,7 @@ const Cover = () => {
|
|||||||
return (
|
return (
|
||||||
<Frame>
|
<Frame>
|
||||||
<div className="h-100 flex flex-column items-center justify-center pa2">
|
<div className="h-100 flex flex-column items-center justify-center pa2">
|
||||||
<div className="ba b--blue bg-blue br-pill h1 w2 flex justify-end">
|
<div className="ba b--black-10 bg-black-30 br-pill h1 w2 flex justify-end">
|
||||||
<div className="bg-white br-pill w1 h-100" />
|
<div className="bg-white br-pill w1 h-100" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Reference in New Issue
Block a user