mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-10-12 08:01:34 +08:00

* chore: added jsx-runtime plugin in eslint tsconfig Signed-off-by: GermaVinsmoke <vaibhav1180@gmail.com> * chore: updated react imports Signed-off-by: GermaVinsmoke <vaibhav1180@gmail.com> * chore: renamed redux dispatch Signed-off-by: GermaVinsmoke <vaibhav1180@gmail.com> * fix: build is fixed --------- Signed-off-by: GermaVinsmoke <vaibhav1180@gmail.com> Co-authored-by: Palash Gupta <palashgdev@gmail.com>
28 lines
470 B
TypeScript
28 lines
470 B
TypeScript
import { ReactNode } from 'react';
|
|
|
|
import { StyledAlert } from './styles';
|
|
|
|
interface MessageTipProps {
|
|
show?: boolean;
|
|
message: ReactNode | string;
|
|
action: ReactNode | undefined;
|
|
}
|
|
|
|
function MessageTip({
|
|
show,
|
|
message,
|
|
action,
|
|
}: MessageTipProps): JSX.Element | null {
|
|
if (!show) return null;
|
|
|
|
return (
|
|
<StyledAlert showIcon description={message} type="info" action={action} />
|
|
);
|
|
}
|
|
|
|
MessageTip.defaultProps = {
|
|
show: false,
|
|
};
|
|
|
|
export default MessageTip;
|