Created
April 28, 2021 18:32
-
-
Save igorfelipee/e425a1647d10040917cedb0c4f88e613 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type PrimeAlertMessageProps = { | |
payload: { | |
mensagem: string | |
}, | |
behaviour: 'VISIVEL' | 'DESABILITADO' | |
} | |
const PrimeAlertMessage: React.FC<PrimeAlertMessageProps> = ({payload, behaviour}) => { | |
switch(behaviour) { | |
case 'VISIVEL': | |
return <p>{payload.mensagem}</p> | |
case 'DESABILITADO': | |
default: | |
return null; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment