import React from 'react';
import type { CSSProperties } from 'react';
import { Row } from '@feewee/h5app-common';

import './style.less';

interface ComponentProps {
  title: string;
  content: string | number;
  rowStyle?: CSSProperties;
  titleStyle?: CSSProperties;
  contentStyle?: CSSProperties;
}

export default function RowText({ title, content, rowStyle, titleStyle, contentStyle }: ComponentProps) {
  return (
    <Row className="row-wrapper" style={rowStyle}>
      <span className="label" style={titleStyle}>
        {title}：
      </span>
      <span className="content" style={contentStyle}>
        {content}
      </span>
    </Row>
  );
}
