diff options
| author | JP Dillingham <jpdillingham@gmail.com> | 2021-10-16 10:41:16 -0500 |
|---|---|---|
| committer | JP Dillingham <jpdillingham@gmail.com> | 2021-10-16 10:41:16 -0500 |
| commit | f6aa24eb0d83f0f04e0da7cc4ffed1984fa6d794 (patch) | |
| tree | c5c01530ae14d44a97b6b344635d8c01b6f18110 /src | |
| parent | 28ec4cd64046deb7bd37ff5c02e32b76d79edf20 (diff) | |
| download | slskd-f6aa24eb0d83f0f04e0da7cc4ffed1984fa6d794.tar.gz | |
allow supression of Error prefix, selection of icon
Diffstat (limited to 'src')
| -rw-r--r-- | src/web/src/components/Shared/ErrorSegment.js | 6 |
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> ); |
