diff --git a/web/components/button.css b/web/components/button.css --- a/web/components/button.css +++ b/web/components/button.css @@ -20,31 +20,31 @@ color: var(--btn-disabled-color); } -.primary { - background: var(--btn-bg-primary); +.filled { + background: var(--btn-bg-filled); color: var(--fg); } -.primary:hover { - background: var(--btn-bg-primary-hover); +.filled:hover { + background: var(--btn-bg-filled-hover); } -.primary:disabled { - background: var(--btn-bg-primary-disabled); +.filled:disabled { + background: var(--btn-bg-filled-disabled); } -.secondary { - background: var(--btn-bg-secondary); +.outline { + background: var(--btn-bg-outline); color: var(--fg); - border-color: var(--btn-secondary-border); + border-color: var(--btn-outline-border); } -.secondary:hover { - background: var(--btn-bg-secondary-hover); +.outline:hover { + background: var(--btn-bg-outline-hover); } -.secondary:disabled { - background: var(--btn-bg-secondary-disabled); +.outline:disabled { + background: var(--btn-bg-outline-disabled); } .success { diff --git a/web/components/button.react.js b/web/components/button.react.js --- a/web/components/button.react.js +++ b/web/components/button.react.js @@ -5,17 +5,20 @@ import css from './button.css'; -export type ButtonVariant = - | 'primary' - | 'secondary' +export type ButtonVariant = 'filled' | 'outline' | 'round'; +export type ButtonColor = | 'success' | 'danger' - | 'round'; + | { + +backgroundColor: string, + +color?: string, + }; export type ButtonProps = { +onClick: (event: SyntheticEvent) => mixed, +children: React.Node, +variant?: ButtonVariant, + +buttonColor?: ButtonColor, +type?: string, +disabled?: boolean, +className?: string, @@ -25,12 +28,18 @@ const { onClick, children, - variant = 'primary', + variant = 'filled', + buttonColor, type, disabled = false, className = '', } = props; - const btnCls = classnames(css.btn, css[variant]); + + const btnCls = classnames( + css.btn, + css[variant], + typeof buttonColor === 'string' ? css[buttonColor] : null, + ); return ( diff --git a/web/components/stepper.react.js b/web/components/stepper.react.js --- a/web/components/stepper.react.js +++ b/web/components/stepper.react.js @@ -37,7 +37,7 @@ return ( - diff --git a/web/modals/threads/cant-leave-thread-modal.react.js b/web/modals/threads/cant-leave-thread-modal.react.js --- a/web/modals/threads/cant-leave-thread-modal.react.js +++ b/web/modals/threads/cant-leave-thread-modal.react.js @@ -20,7 +20,7 @@ - diff --git a/web/modals/threads/members/add-members-modal.react.js b/web/modals/threads/members/add-members-modal.react.js --- a/web/modals/threads/members/add-members-modal.react.js +++ b/web/modals/threads/members/add-members-modal.react.js @@ -147,12 +147,12 @@ />
- diff --git a/web/settings/relationship/block-users-modal.react.js b/web/settings/relationship/block-users-modal.react.js --- a/web/settings/relationship/block-users-modal.react.js +++ b/web/settings/relationship/block-users-modal.react.js @@ -36,7 +36,7 @@ name="Block Users" excludedStatuses={excludedStatuses} confirmButtonContent={buttonContent} - confirmButtonVariant="danger" + confirmButtonColor="danger" relationshipAction={relationshipActions.BLOCK} /> ); diff --git a/web/settings/relationship/user-list-row.css b/web/settings/relationship/user-list-row.css --- a/web/settings/relationship/user-list-row.css +++ b/web/settings/relationship/user-list-row.css @@ -23,7 +23,7 @@ .button { font-size: var(--s-font-14); line-height: var(--line-height-text); - color: var(--btn-bg-primary); + color: var(--btn-bg-filled); cursor: pointer; background: none; border: none; diff --git a/web/theme.css b/web/theme.css --- a/web/theme.css +++ b/web/theme.css @@ -60,12 +60,12 @@ --success: var(--success-dark-50); /* Color Theme */ - --btn-bg-primary: var(--violet-dark-100); - --btn-bg-primary-hover: var(--violet-dark-80); - --btn-bg-primary-disabled: var(--shades-black-80); - --btn-bg-secondary: var(--shades-black-90); - --btn-bg-secondary-hover: var(--shades-black-80); - --btn-bg-secondary-disabled: var(--shades-black-90); + --btn-bg-filled: var(--violet-dark-100); + --btn-bg-filled-hover: var(--violet-dark-80); + --btn-bg-filled-disabled: var(--shades-black-80); + --btn-bg-outline: var(--shades-black-90); + --btn-bg-outline-hover: var(--shades-black-80); + --btn-bg-outline-disabled: var(--shades-black-90); --btn-bg-success: var(--success-dark-50); --btn-bg-success-hover: var(--success-dark-90); --btn-bg-success-disabled: var(--shades-black-80); @@ -96,7 +96,7 @@ --help-color: var(--shades-black-60); --breadcrumb-color: var(--shades-white-60); --breadcrumb-color-unread: var(--shades-white-60); - --btn-secondary-border: var(--shades-black-60); + --btn-outline-border: var(--shades-black-60); --thread-color-read: var(--shades-black-60); --thread-from-color-read: var(--shades-black-80); --thread-last-message-color-read: var(--shades-black-60);