mirror of
https://github.com/phuoc-ng/csslayout.git
synced 2025-08-16 02:54:20 +02:00
Add pricing table
This commit is contained in:
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>
|
||||
<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="w-40 br-pill h-100 bg-blue" />
|
||||
<div className="w-40 br-pill h-100 bg-black-30" />
|
||||
</div>
|
||||
</div>
|
||||
</Frame>
|
||||
|
@@ -6,7 +6,7 @@ const Cover = () => {
|
||||
return (
|
||||
<Frame>
|
||||
<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>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user