import { memo } from 'react';
import styles from './index.less';
import React from 'react';
import { IWhiteTplConfig } from './schema';
import logo from 'editorAssets/13-空白.png';
interface IProps extends IWhiteTplConfig {
  isTpl: boolean;
  width: number;
}

const WhiteTpl = memo((props: IProps) => {
  const { bgColor, text, fontSize, color, height, width, isTpl } = props;
  return (
    <>
      {isTpl ? (
        <div>
          <img src={logo} alt=""></img>
        </div>
      ) : (
          <div
            className={styles.whiteTpl}
            style={{ backgroundColor: bgColor, width, height, lineHeight: height + 'px' }}
          >
            <div className={styles.title} style={{ fontSize, color }}>
              {text}
            </div>
          </div>
        )}
    </>
  );
});

export default WhiteTpl;
