mirror of
https://github.com/MrXujiang/h5-Dooring.git
synced 2025-12-17 06:02:49 +00:00
23 lines
636 B
TypeScript
23 lines
636 B
TypeScript
import { NoticeBar } from 'zarm';
|
|
import React, { memo } from 'react';
|
|
import { INoticeConfig } from './schema';
|
|
import logo from '@/assets/09-通知.png';
|
|
const Notice = memo((props: INoticeConfig & { isTpl: boolean }) => {
|
|
const { text, speed, theme, isClose = false, isTpl } = props;
|
|
return (
|
|
<>
|
|
{isTpl ? (
|
|
<div>
|
|
<img src={logo} alt=""></img>
|
|
</div>
|
|
) : (
|
|
<NoticeBar theme={theme === 'default' ? undefined : theme} closable={isClose} speed={speed}>
|
|
<span style={{ color: 'inherit' }}>{text}</span>
|
|
</NoticeBar>
|
|
)}
|
|
</>
|
|
);
|
|
});
|
|
|
|
export default Notice;
|