Files
actual/packages/component-library/src/Paragraph.tsx
2025-02-11 18:33:50 +00:00

33 lines
537 B
TypeScript

import { type HTMLProps } from 'react';
import { css } from '@emotion/css';
import { type CSSProperties } from './styles';
type ParagraphProps = HTMLProps<HTMLDivElement> & {
style?: CSSProperties;
isLast?: boolean;
};
export function Paragraph({
style,
isLast,
children,
...props
}: ParagraphProps) {
return (
<div
{...props}
className={css([
!isLast && { marginBottom: 15 },
style,
{
lineHeight: '1.5em',
},
])}
>
{children}
</div>
);
}