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 = 'primary' | 'secondary' | 'round'; +export type ButtonColor = | 'success' | 'danger' - | 'round'; + | { + +backgroundColor: string, + +color?: string, + }; export type ButtonProps = { +onClick: (event: SyntheticEvent) => mixed, +children: React.Node, +variant?: ButtonVariant, + +color?: ButtonColor, +type?: string, +disabled?: boolean, +className?: string, @@ -26,11 +29,17 @@ onClick, children, variant = 'primary', + color, type, disabled = false, className = '', } = props; - const btnCls = classnames(css.btn, css[variant]); + + const btnCls = classnames( + css.btn, + css[variant], + typeof color === 'string' ? css[color] : null, + ); return ( diff --git a/web/modals/chat/sidebar-promote-modal.react.js b/web/modals/chat/sidebar-promote-modal.react.js --- a/web/modals/chat/sidebar-promote-modal.react.js +++ b/web/modals/chat/sidebar-promote-modal.react.js @@ -37,7 +37,12 @@ - diff --git a/web/modals/threads/confirm-leave-thread-modal.react.js b/web/modals/threads/confirm-leave-thread-modal.react.js --- a/web/modals/threads/confirm-leave-thread-modal.react.js +++ b/web/modals/threads/confirm-leave-thread-modal.react.js @@ -35,7 +35,12 @@ - diff --git a/web/modals/threads/settings/thread-settings-delete-tab.react.js b/web/modals/threads/settings/thread-settings-delete-tab.react.js --- a/web/modals/threads/settings/thread-settings-delete-tab.react.js +++ b/web/modals/threads/settings/thread-settings-delete-tab.react.js @@ -118,7 +118,8 @@ { @@ -127,7 +127,12 @@ }, [dispatchActionPromise, updateRelationshipsActionPromise]); return ( - 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} /> );