@sb1/ffe-core-react
Version:
React components for ffe-core components
12 lines (11 loc) • 614 B
JavaScript
import React from 'react';
import classNames from 'classnames';
export function Paragraph(props) {
const { children, className, lead, subLead, textCenter, textLeft, noMargin, ...rest } = props;
const [mainClass] = [
lead && 'ffe-lead-paragraph',
subLead && 'ffe-sub-lead-paragraph',
'ffe-body-paragraph',
].filter(Boolean);
return (React.createElement("p", { className: classNames(mainClass, { 'ffe-body-paragraph--text-center': textCenter }, { 'ffe-body-paragraph--text-left': textLeft }, { 'ffe-body-paragraph--no-margin': noMargin }, className), ...rest }, children));
}