1
0
Fork 0
mirror of https://github.com/pawelmalak/flame.git synced 2025-07-19 19:49:37 +02:00
flame/client/src/components/UI/Text/Message/Message.tsx

14 lines
347 B
TypeScript
Raw Normal View History

import { ReactNode } from 'react';
import classes from './Message.module.css';
interface Props {
children: ReactNode;
isPrimary?: boolean;
}
export const Message = ({ children, isPrimary = true }: Props): JSX.Element => {
const style = isPrimary ? classes.message : classes.messageCenter;
return <p className={style}>{children}</p>;
};