+
+
### Primary
-Primary buttons represent **positive** actions such as uploading, confirming, and accepting changes.
+The primary button represents the **single positive** action on a page or modal, such as uploading, confirming, and accepting changes.
+
+
+
+
```vue-html
```
+
+
+
+
### Secondary
Secondary buttons represent **neutral** actions such as cancelling a change or dismissing a notification.
+
+
+
+
```vue-html
-
+
+
Secondary button
+
+
+Note that on a secondary background, the button needs to be `raised` to make it stand out.
+
### Destructive
Desctrutive buttons represent **dangerous** actions including deleting items or purging domain information.
+
+
+
+
```vue-html
Destructive button
```
+
+
Destructive button
+
+
## Button variants
Buttons come in different styles that you can use depending on the location of the button.
@@ -225,7 +253,7 @@ This can be useful for toggle buttons (if you don't want to use a [Toggle compo
```
-**Secondary (default):**
+**Default:**
Inactive button
@@ -237,6 +265,18 @@ This can be useful for toggle buttons (if you don't want to use a [Toggle compo
---
+**Secondary:**
+
+
+ Inactive button
+
+
+
+ Active button
+
+
+---
+
**Primary:**
@@ -275,6 +315,10 @@ If a user can't interact with a button until something has finished loading, you
Loading button
+
+ Loading button
+
+
### Promise handling in `@click`
When a function passed to `@click` returns a promise, the button automatically toggles a loading state on click. When the promise resolves or is rejected, the loading state turns off.
diff --git a/front/ui-docs/using-color.md b/front/ui-docs/using-color.md
index b5ed0dfe3..49c036879 100644
--- a/front/ui-docs/using-color.md
+++ b/front/ui-docs/using-color.md
@@ -22,8 +22,8 @@ Want to fix colors?
Modify a specific variant
-
+
# Using Color
## Add color via props
@@ -445,40 +445,6 @@ Many browsers automatically turn on "night mode" to lower the light emission of
In both "dark mode" and "light mode", the colors must provide adequate contrast and consistency.
-All colors added through the `color` or the `propsToColor` function in `composable/colors.ts` respect this setting. If you need to define new colors, use the following syntax in your `scss`:
-
-```scss
-@include light-theme {
- --my-new-color: var(--fw-blue-400);
-}
-@include dark-theme {
- --my-new-color: var(--fw-blue-800);
-}
-```
-
-It's good practice to limit the scope of a variable to the module that needs it:
-
-```vue
-
-
-
-
-
-```
-
Read more about [style modules in the corresponding vue docs](https://vuejs.org/api/sfc-css-features.html#css-modules).
For testing purposes and side-by-side comparisons, you can add the classes `force-dark-theme` and `force-light-theme`.
@@ -650,7 +616,7 @@ Here is the meaning the styles should convey:
Button ghost Button outline Button solid
- Button active
+ Button active Button disabled Button primary
@@ -692,7 +658,7 @@ Here is the meaning the styles should convey:
Button ghost Button outline Button solid
- Button active
+ Button active Button disabled Button primary
@@ -734,7 +700,7 @@ Here is the meaning the styles should convey:
Button ghost Button outline Button solid
- Button active
+ Button active Button disabled Button primary
@@ -776,7 +742,7 @@ Here is the meaning the styles should convey:
Button ghost Button outline Button solid
- Button active
+ Button active Button disabled Button primary
@@ -786,7 +752,7 @@ Here is the meaning the styles should convey:
Button raised ghost Button raised outline Button raised solid
- Button active
+ Button active Button raised disabled