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