-
-
-
-
-
-
-
-
-
- Generate secret token
-
-
-
-
+
+
+
+
+
+
+
+
+ Generate secret token
+
+
+
@@ -27,49 +31,52 @@
-
-
-
+
-
-
-
-
-
- Count:
-
-
-
+
-
-
- Padded hex:
-
-
-
+
Iteration
+
+
+
+
diff --git a/src/ui/c-button/c-button.theme.ts b/src/ui/c-button/c-button.theme.ts
index 87ad89f3..5b4c26f7 100644
--- a/src/ui/c-button/c-button.theme.ts
+++ b/src/ui/c-button/c-button.theme.ts
@@ -27,6 +27,21 @@ const createTheme = ({ style }: { style: 'light' | 'dark' }) => {
const theme = appThemes[style];
return {
+ size: {
+ small: {
+ width: '28px',
+ fontSize: '12px',
+ },
+ medium: {
+ width: '34px',
+ fontSize: '14px',
+ },
+ large: {
+ width: '40px',
+ fontSize: '16px',
+ },
+ },
+
basic: {
default: createState({
textColor: theme.text.baseColor,
@@ -41,10 +56,10 @@ const createTheme = ({ style }: { style: 'light' | 'dark' }) => {
pressedBackground: darken(theme.primary.colorFaded, 30),
}),
warning: createState({
- textColor: theme.text.baseColor,
- backgroundColor: theme.warning.color,
- hoverBackground: theme.warning.colorHover,
- pressedBackground: theme.warning.colorPressed,
+ textColor: theme.warning.color,
+ backgroundColor: theme.warning.colorFaded,
+ hoverBackground: lighten(theme.warning.colorFaded, 30),
+ pressedBackground: darken(theme.warning.colorFaded, 30),
}),
},
text: {
@@ -61,10 +76,10 @@ const createTheme = ({ style }: { style: 'light' | 'dark' }) => {
pressedBackground: darken(theme.primary.colorFaded, 30),
}),
warning: createState({
- textColor: theme.text.baseColor,
- backgroundColor: theme.warning.color,
- hoverBackground: theme.warning.colorHover,
- pressedBackground: theme.warning.colorPressed,
+ textColor: darken(theme.warning.color, 20),
+ backgroundColor: 'transparent',
+ hoverBackground: theme.warning.colorFaded,
+ pressedBackground: darken(theme.warning.colorFaded, 30),
}),
},
};
diff --git a/src/ui/c-button/c-button.vue b/src/ui/c-button/c-button.vue
index 2cbc4fd4..121a1e96 100644
--- a/src/ui/c-button/c-button.vue
+++ b/src/ui/c-button/c-button.vue
@@ -18,13 +18,14 @@ import { useAppTheme } from '../theme/themes';
const props = withDefaults(
defineProps<{
- type?: 'default' | 'primary';
+ type?: 'default' | 'primary' | 'warning';
variant?: 'basic' | 'text';
disabled?: boolean;
round?: boolean;
circle?: boolean;
href?: string;
to?: RouteLocationRaw;
+ size?: 'small' | 'medium' | 'large';
}>(),
{
type: 'default',
@@ -34,9 +35,10 @@ const props = withDefaults(
circle: false,
href: undefined,
to: undefined,
+ size: 'medium',
},
);
-const { variant, disabled, round, circle, href, type, to } = toRefs(props);
+const { variant, disabled, round, circle, href, type, to, size: sizeName } = toRefs(props);
const emits = defineEmits(['click']);
@@ -58,18 +60,20 @@ const tag = computed(() => {
return 'button';
});
const appTheme = useAppTheme();
+
+const size = computed(() => theme.value.size[sizeName.value]);
diff --git a/src/ui/demo/demo-wrapper.vue b/src/ui/demo/demo-wrapper.vue
index cc16a00f..8d4bae00 100644
--- a/src/ui/demo/demo-wrapper.vue
+++ b/src/ui/demo/demo-wrapper.vue
@@ -18,6 +18,8 @@