File size: 791 Bytes
1e92f2d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import clsx from 'clsx';
import React from 'react';
import './styles.scss';

interface Props {
	children: React.ReactNode;
	className?: string;
	width?: 'medium' | 'small';
	isMonoBg?: boolean;
	animate?: boolean;
}

export function LayoutBlock( props: Props ) {
	const { children, className, width, isMonoBg, animate = true } = props;

	return (
		<div
			className={ clsx( 'l-block', className, {
				'is-mono-bg': isMonoBg,
				'width-small': width === 'small',
				'width-medium': width === 'medium',
				animate: animate,
			} ) }
		>
			<div className="l-block-wrapper">{ children }</div>
		</div>
	);
}

export function LayoutBlockSection( props: Props ) {
	const { children, className } = props;

	return <div className={ clsx( 'l-block-section', className ) }>{ children }</div>;
}