mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2026-04-20 22:14:34 -04:00
New: Project Aphrodite
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
import PropTypes from 'prop-types';
|
||||
import React from 'react';
|
||||
import { kinds, sizes } from 'Helpers/Props';
|
||||
import Label from 'Components/Label';
|
||||
|
||||
function PageSidebarStatus({ count, errors, warnings }) {
|
||||
if (!count) {
|
||||
return null;
|
||||
}
|
||||
|
||||
let kind = kinds.INFO;
|
||||
|
||||
if (errors) {
|
||||
kind = kinds.DANGER;
|
||||
} else if (warnings) {
|
||||
kind = kinds.WARNING;
|
||||
}
|
||||
|
||||
return (
|
||||
<Label
|
||||
kind={kind}
|
||||
size={sizes.MEDIUM}
|
||||
>
|
||||
{count}
|
||||
</Label>
|
||||
);
|
||||
}
|
||||
|
||||
PageSidebarStatus.propTypes = {
|
||||
count: PropTypes.number,
|
||||
errors: PropTypes.bool,
|
||||
warnings: PropTypes.bool
|
||||
};
|
||||
|
||||
export default PageSidebarStatus;
|
||||
Reference in New Issue
Block a user