Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3114774
D5088.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D5088.diff
View Options
diff --git a/web/components/button.css b/web/components/button.css
--- a/web/components/button.css
+++ b/web/components/button.css
@@ -47,6 +47,19 @@
background: var(--btn-bg-secondary-disabled);
}
+.success {
+ background: var(--btn-bg-success);
+ color: var(--fg);
+}
+
+.success:hover {
+ background: var(--btn-bg-success-hover);
+}
+
+.success:disabled {
+ background: var(--btn-bg-success-disabled);
+}
+
.danger {
background: var(--btn-bg-danger);
color: var(--fg);
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,7 +5,12 @@
import css from './button.css';
-export type ButtonVariant = 'primary' | 'secondary' | 'danger' | 'round';
+export type ButtonVariant =
+ | 'primary'
+ | 'secondary'
+ | 'success'
+ | 'danger'
+ | 'round';
type Props = {
+onClick: (event: SyntheticEvent<HTMLButtonElement>) => mixed,
diff --git a/web/theme.css b/web/theme.css
--- a/web/theme.css
+++ b/web/theme.css
@@ -66,6 +66,9 @@
--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-success: var(--success-dark-50);
+ --btn-bg-success-hover: var(--success-dark-90);
+ --btn-bg-success-disabled: var(--shades-black-80);
--btn-bg-danger: var(--error-primary);
--btn-bg-danger-hover: var(--error-dark-50);
--btn-bg-danger-disabled: var(--shades-black-80);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Nov 1, 8:37 PM (21 h, 56 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2401322
Default Alt Text
D5088.diff (1 KB)
Attached To
Mode
D5088: [web] Add `success` variant to `Button` component
Attached
Detach File
Event Timeline
Log In to Comment