mirror of
https://github.com/MrXujiang/h5-Dooring.git
synced 2025-12-16 13:32:50 +00:00
22 lines
584 B
TypeScript
22 lines
584 B
TypeScript
import React, { memo } from 'react';
|
|
import styles from './index.less';
|
|
import { ITextConfig } from './schema';
|
|
import logo from '@/assets/12-文本.png';
|
|
const Text = memo((props: ITextConfig & { isTpl: boolean }) => {
|
|
const { align, text, fontSize, color, lineHeight, isTpl } = props;
|
|
return (
|
|
<>
|
|
{isTpl ? (
|
|
<div>
|
|
<img src={logo} alt=""></img>
|
|
</div>
|
|
) : (
|
|
<div className={styles.textWrap} style={{ color, textAlign: align, fontSize, lineHeight }}>
|
|
{text}
|
|
</div>
|
|
)}
|
|
</>
|
|
);
|
|
});
|
|
export default Text;
|