aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJP Dillingham <jpdillingham@gmail.com>2021-10-16 10:41:16 -0500
committerJP Dillingham <jpdillingham@gmail.com>2021-10-16 10:41:16 -0500
commitf6aa24eb0d83f0f04e0da7cc4ffed1984fa6d794 (patch)
treec5c01530ae14d44a97b6b344635d8c01b6f18110
parent28ec4cd64046deb7bd37ff5c02e32b76d79edf20 (diff)
downloadslskd-f6aa24eb0d83f0f04e0da7cc4ffed1984fa6d794.tar.gz
allow supression of Error prefix, selection of icon
-rw-r--r--src/web/src/components/Shared/ErrorSegment.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/web/src/components/Shared/ErrorSegment.js b/src/web/src/components/Shared/ErrorSegment.js
index 7a6caa9d..43c6fabb 100644
--- a/src/web/src/components/Shared/ErrorSegment.js
+++ b/src/web/src/components/Shared/ErrorSegment.js
@@ -2,11 +2,11 @@ import React from 'react';
import { Segment, Header, Icon } from 'semantic-ui-react';
-const ErrorSegment = ({ icon, caption }) => (
+const ErrorSegment = ({ icon = 'x', caption, suppressPrefix = false }) => (
<Segment className='error-segment' placeholder basic>
<Header icon>
- <Icon name='x' color='red'/>
- Error: {caption}
+ <Icon name={icon} color='red'/>
+ {!suppressPrefix && "Error: "}{caption}
</Header>
</Segment>
);