handle macro errors

This commit is contained in:
Jan Prochazka
2020-11-01 10:47:13 +01:00
parent 4efa87c3c8
commit cb0aee6476
5 changed files with 48 additions and 5 deletions

View File

@@ -14,7 +14,20 @@ const Icon = styled.div`
margin: 10px;
`;
export default function ErrorInfo({ message, icon = 'fas fa-times-circle red' }) {
const ContainerSmall = styled.div`
display: flex;
margin-right: 10px;
`;
export default function ErrorInfo({ message, icon = 'fas fa-times-circle red', isSmall = false }) {
if (isSmall) {
return (
<ContainerSmall>
<FontIcon icon={icon} />
{message}
</ContainerSmall>
);
}
return (
<Container>
<Icon>