1
0
mirror of https://github.com/phuoc-ng/csslayout.git synced 2025-10-23 18:56:29 +02:00

Add nested dropdowns pattern

This commit is contained in:
Phuoc Nguyen
2020-01-13 23:59:14 +07:00
parent aabd3d5ffd
commit 02d9818c56
9 changed files with 291 additions and 3 deletions

View File

@@ -0,0 +1,81 @@
/**
* A collection of popular layouts and patterns made with CSS (https://csslayout.io)
* (c) 2019 - 2020 Nguyen Huu Phuoc <https://twitter.com/nghuuphuoc>
*/
import React from 'react';
import Circle from '../../placeholders/Circle';
import Frame from '../../placeholders/Frame';
import Line from '../../placeholders/Line';
const Cover: React.FC<{}> = () => {
return (
<Frame>
<div
style={{
alignItems: 'center',
display: 'flex',
flexDirection: 'column',
height: '100%',
justifyContent: 'center',
padding: '8px',
}}
>
<div
style={{
alignItems: 'center',
border: '1px solid rgba(0, 0, 0, 0.3)',
display: 'flex',
justifyContent: 'center',
}}
>
<div
style={{
flex: 1,
padding: '4px 8px',
}}
>
<Circle size={8} />
</div>
<div
style={{
backgroundColor: 'rgba(0, 0, 0, 0.1)',
flex: 1,
padding: '4px 8px',
position: 'relative',
}}
>
<Circle size={8} />
<div
style={{
border: '1px solid rgba(0, 0, 0, 0.3)',
borderTopColor: 'transparent',
left: 0,
padding: '4px',
position: 'absolute',
top: '100%',
width: '100%',
}}
>
<div style={{ marginBottom: '4px' }}><Line /></div>
<div style={{ marginBottom: '4px', width: '60%' }}><Line /></div>
<div style={{ marginBottom: '4px' }}><Line /></div>
<div style={{ width: '80%' }}><Line /></div>
</div>
</div>
<div
style={{
flex: 1,
padding: '4px 8px',
}}
>
<Circle size={8} />
</div>
</div>
</div>
</Frame>
);
};
export default Cover;