1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-25 12:56:41 +07:00

better gray buttons

This commit is contained in:
Fedor Katurov 2019-12-02 16:58:03 +07:00
parent 5646ec164a
commit bde79a8364
4 changed files with 9 additions and 11 deletions

View file

@ -9,14 +9,12 @@ type IButtonProps = DetailedHTMLProps<
HTMLButtonElement HTMLButtonElement
> & { > & {
size?: 'mini' | 'normal' | 'big' | 'giant' | 'micro' | 'small'; size?: 'mini' | 'normal' | 'big' | 'giant' | 'micro' | 'small';
color?: 'primary' | 'secondary' | 'outline' | 'link'; color?: 'primary' | 'secondary' | 'outline' | 'link' | 'gray';
iconLeft?: IIcon; iconLeft?: IIcon;
iconRight?: IIcon; iconRight?: IIcon;
seamless?: boolean; seamless?: boolean;
transparent?: boolean; transparent?: boolean;
title?: string; title?: string;
red?: boolean;
grey?: boolean;
non_submitting?: boolean; non_submitting?: boolean;
is_loading?: boolean; is_loading?: boolean;
stretchy?: boolean; stretchy?: boolean;
@ -34,8 +32,6 @@ const Button: FC<IButtonProps> = memo(
seamless = false, seamless = false,
transparent = false, transparent = false,
non_submitting = false, non_submitting = false,
red = false,
grey = false,
is_loading, is_loading,
title, title,
stretchy, stretchy,
@ -47,8 +43,6 @@ const Button: FC<IButtonProps> = memo(
seamless || non_submitting ? 'div' : 'button', seamless || non_submitting ? 'div' : 'button',
{ {
className: classnames(styles.button, className, styles[size], styles[color], { className: classnames(styles.button, className, styles[size], styles[color], {
red,
grey,
seamless, seamless,
transparent, transparent,
disabled, disabled,

View file

@ -161,6 +161,10 @@
} }
} }
&.gray {
background: lighten($content_bg, 8%);
}
&.link { &.link {
background: transparent; background: transparent;
color: white; color: white;

View file

@ -231,11 +231,11 @@ const CommentFormUnconnected: FC<IProps> = ({
<Group horizontal className={styles.buttons}> <Group horizontal className={styles.buttons}>
<ButtonGroup> <ButtonGroup>
<Button iconLeft="image" size="small" grey iconOnly> <Button iconLeft="image" size="small" color="gray" iconOnly>
<input type="file" onInput={onInputChange} multiple accept="image/*" /> <input type="file" onInput={onInputChange} multiple accept="image/*" />
</Button> </Button>
<Button iconRight="enter" size="small" grey iconOnly> <Button iconRight="enter" size="small" color="gray" iconOnly>
<input type="file" onInput={onInputChange} multiple accept="audio/*" /> <input type="file" onInput={onInputChange} multiple accept="audio/*" />
</Button> </Button>
</ButtonGroup> </ButtonGroup>
@ -244,7 +244,7 @@ const CommentFormUnconnected: FC<IProps> = ({
{is_sending_comment && <LoaderCircle size={20} />} {is_sending_comment && <LoaderCircle size={20} />}
<Button size="small" grey iconRight="enter" disabled={is_sending_comment}> <Button size="small" color="gray" iconRight="enter" disabled={is_sending_comment}>
Сказать Сказать
</Button> </Button>
</Group> </Group>

View file

@ -69,7 +69,7 @@ const MessageFormUnconnected: FC<IProps> = ({
<Button <Button
size="small" size="small"
grey color="gray"
iconRight="enter" iconRight="enter"
disabled={is_sending_messages} disabled={is_sending_messages}
onClick={onSubmit} onClick={onSubmit}