1234567891011121314151617181920212223242526272829303132333435363738 |
- import * as React from "react";
- import { IconProp } from "@fortawesome/fontawesome-svg-core";
- import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
- interface IMessageLineComponentProps {
- text: string;
- color?: string;
- icon?: IconProp;
- }
- export class MessageLineComponent extends React.Component<IMessageLineComponentProps> {
- constructor(props: IMessageLineComponentProps) {
- super(props);
- }
- render() {
- if (this.props.icon) {
- return (
- <div className="iconMessageLine">
- <div className="icon" style={{ color: this.props.color ? this.props.color : "" }}>
- <FontAwesomeIcon icon={this.props.icon}/>
- </div>
- <div className="value" title={this.props.text}>
- {this.props.text}
- </div>
- </div>
- );
- }
- return (
- <div className="messageLine">
- <div className="value" title={this.props.text} style={{ color: this.props.color ? this.props.color : "" }}>
- {this.props.text}
- </div>
- </div>
- );
- }
- }
|