mirror of
https://github.com/phuoc-ng/csslayout.git
synced 2025-08-06 14:16:50 +02:00
Add related patterns section
This commit is contained in:
19
client/layouts/RelatedPatterns.jsx
Normal file
19
client/layouts/RelatedPatterns.jsx
Normal file
@@ -0,0 +1,19 @@
|
||||
import React, { useEffect } from 'react';
|
||||
|
||||
import CoverCard from '../CoverCard';
|
||||
|
||||
const RelatedPatterns = ({ patterns }) => {
|
||||
return (
|
||||
<div className="bt b--black-20 relative">
|
||||
<h3 className="absolute bg-white f4 left-2 lh-copy ma0 ph2 top-0 ttu" style={{ transform: 'translate(0px, -50%)' }}>Related patterns</h3>
|
||||
|
||||
<div className="flex flex-wrap items-start pa4">
|
||||
{
|
||||
patterns.map(pattern => <CoverCard key={pattern} pattern={pattern} />)
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default RelatedPatterns;
|
@@ -1,6 +1,7 @@
|
||||
import React, { useState } from 'react';
|
||||
|
||||
import DetailsLayout from '../../layouts/DetailsLayout';
|
||||
import RelatedPatterns from '../../layouts/RelatedPatterns';
|
||||
import BrowserFrame from '../../placeholders/BrowserFrame';
|
||||
import SampleCode from '../../SampleCode';
|
||||
|
||||
@@ -77,6 +78,7 @@ code={`
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<RelatedPatterns patterns={['Switch']} />
|
||||
</DetailsLayout>
|
||||
);
|
||||
};
|
||||
|
@@ -1,6 +1,7 @@
|
||||
import React, { useState } from 'react';
|
||||
|
||||
import DetailsLayout from '../../layouts/DetailsLayout';
|
||||
import RelatedPatterns from '../../layouts/RelatedPatterns';
|
||||
import BrowserFrame from '../../placeholders/BrowserFrame';
|
||||
import SampleCode from '../../SampleCode';
|
||||
|
||||
@@ -67,6 +68,7 @@ code={`
|
||||
}
|
||||
/>
|
||||
</div>
|
||||
<RelatedPatterns patterns={['Radio switch']} />
|
||||
</DetailsLayout>
|
||||
);
|
||||
};
|
||||
|
Reference in New Issue
Block a user