Get spinners back in working order

This commit is contained in:
Dane Everitt 2020-07-04 12:39:55 -07:00
parent d260200947
commit 5473edc006
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
16 changed files with 74 additions and 50 deletions

View file

@ -2,13 +2,13 @@ import React from 'react';
import MessageBox from '@/components/MessageBox';
import { State, useStoreState } from 'easy-peasy';
import { ApplicationStore } from '@/state';
import tw from 'twin.macro';
type Props = Readonly<{
byKey?: string;
spacerClass?: string;
}>;
export default ({ spacerClass, byKey }: Props) => {
export default ({ byKey }: Props) => {
const flashes = useStoreState((state: State<ApplicationStore>) => state.flashes.items);
let filtered = flashes;
@ -25,7 +25,7 @@ export default ({ spacerClass, byKey }: Props) => {
{
filtered.map((flash, index) => (
<React.Fragment key={flash.id || flash.type + flash.message}>
{index > 0 && <div css={tw`${spacerClass || 'mt-2'}`}></div>}
{index > 0 && <div css={tw`mt-2`}></div>}
<MessageBox type={flash.type} title={flash.title}>
{flash.message}
</MessageBox>