Get spinners back in working order
This commit is contained in:
parent
d260200947
commit
5473edc006
16 changed files with 74 additions and 50 deletions
|
@ -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>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue