Support deleting existing databases

This commit is contained in:
Dane Everitt 2019-07-16 22:15:14 -07:00
parent 1f763dc155
commit d081f328ab
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
7 changed files with 150 additions and 40 deletions

View file

@ -6,10 +6,10 @@ import { ApplicationStore } from '@/state';
type Props = Readonly<{
byKey?: string;
spacerClass?: string;
withBottomSpace?: boolean;
className?: string;
}>;
export default ({ withBottomSpace, spacerClass, byKey }: Props) => {
export default ({ className, spacerClass, byKey }: Props) => {
const flashes = useStoreState((state: State<ApplicationStore>) => state.flashes.items);
let filtered = flashes;
@ -21,9 +21,8 @@ export default ({ withBottomSpace, spacerClass, byKey }: Props) => {
return null;
}
// noinspection PointlessBooleanExpressionJS
return (
<div className={withBottomSpace === false ? undefined : 'mb-2'}>
<div className={className}>
{
filtered.map((flash, index) => (
<React.Fragment key={flash.id || flash.type + flash.message}>