import { Cell } from '@taroify/core';
import { CellProps } from '@taroify/core/cell';
import classNames from 'classnames';

import './index.less';

interface IProps extends CellProps {
  rightText?: string;
}

const PREFIX = 'bl-cell';

function BlCell(props: IProps) {
  const { className, rightText, ...otherProps } = props;
  return (
    <Cell className={classNames(PREFIX, className)} {...otherProps}>
      {rightText && <div className={`${PREFIX}__right-text`}>{rightText}</div>}
    </Cell>
  );
}

export default BlCell;
