mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-11-28 19:55:53 +03:00
parent
a15efab60c
commit
2c08d2477e
@ -1,7 +1,7 @@
|
||||
import {
|
||||
LoadingSpinner, StatelessToggleSwitchField as Toggle,
|
||||
|
||||
Text
|
||||
Box,
|
||||
Icon,
|
||||
LoadingSpinner, StatelessToggleSwitchField as Toggle
|
||||
} from '@tlon/indigo-react';
|
||||
import React, { ReactElement } from 'react';
|
||||
import { useStatelessAsyncClickable } from '~/logic/lib/useStatelessAsyncClickable';
|
||||
@ -22,11 +22,17 @@ export function StatelessAsyncToggle({
|
||||
} = useStatelessAsyncClickable(onClick, name);
|
||||
|
||||
return state === 'error' ? (
|
||||
<Text>Error</Text>
|
||||
<Box width={5} textAlign='center' title='Something went wrong...'>
|
||||
<Icon icon='ExclaimationMarkBold' />
|
||||
</Box>
|
||||
) : state === 'loading' ? (
|
||||
<LoadingSpinner foreground={'white'} background="gray" />
|
||||
<Box width={5} textAlign='center'>
|
||||
<LoadingSpinner foreground={'white'} background="gray" />
|
||||
</Box>
|
||||
) : state === 'success' ? (
|
||||
<Text mx={2}>Done</Text>
|
||||
<Box width={5} textAlign='center' title='Success'>
|
||||
<Icon icon='CheckmarkBold' />
|
||||
</Box>
|
||||
) : (
|
||||
<Toggle onClick={handleClick} {...rest} />
|
||||
);
|
||||
|
@ -34,8 +34,8 @@ export function GroupPersonalSettings(props: {
|
||||
>
|
||||
<StatelessAsyncToggle selected={watching} onClick={onClick} />
|
||||
<Col>
|
||||
<Label>Notify me on group activity</Label>
|
||||
<Label mt={2} gray>Send me notifications when this group changes</Label>
|
||||
<Label>Notify me on participant activity</Label>
|
||||
<Label mt={2} gray>When a user joins or leaves this group, send me a notification</Label>
|
||||
</Col>
|
||||
</BaseLabel>
|
||||
</Col>
|
||||
|
Loading…
Reference in New Issue
Block a user