1
0
mirror of https://github.com/phuoc-ng/csslayout.git synced 2025-10-23 18:56:29 +02:00
Files
csslayout/client/patterns/fading-long-section/Cover.tsx
2020-01-10 13:30:40 +07:00

59 lines
1.8 KiB
TypeScript

/**
* 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 random from '../../helpers/random';
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: '16px',
}}
>
<div
style={{
height: '100%',
overflow: 'hidden',
position: 'relative',
width: '100%',
}}
>
{
Array(20).fill(0).map((_, index) => {
return (
<div key={index} style={{ marginBottom: '4px', width: `${random(4, 10) * 10}%` }}>
<Line />
</div>
);
})
}
<div
style={{
background: 'linear-gradient(rgba(255, 255, 255, 0.001), #fff)',
bottom: 0,
height: '30px',
left: 0,
position: 'absolute',
width: '100%',
}}
/>
</div>
</div>
</Frame>
);
};
export default Cover;