File size: 564 Bytes
1e92f2d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import clsx from 'clsx';
import PropTypes from 'prop-types';

const ActionPanelFigure = ( { inlineBodyText = false, align = 'right', children } ) => {
	const figureClasses = clsx(
		'action-panel__figure',
		'left' === align ? 'align-left' : 'align-right',
		{ 'is-inline-body-text': inlineBodyText }
	);

	return <div className={ figureClasses }>{ children }</div>;
};

ActionPanelFigure.propTypes = {
	inlineBodyText: PropTypes.bool, // above `480px` does figure align with body text (below title)
	align: PropTypes.string,
};

export default ActionPanelFigure;