diff options
author | 2023-05-16 23:12:37 +0200 | |
---|---|---|
committer | 2023-05-17 00:34:10 +0200 | |
commit | 34d8e5ce2ca5d7a27c19ee2cb704bbfd3a215b29 (patch) | |
tree | e5245057f91bf273e53d91b9caf34f050bac1bf8 /src/ui/c-button | |
parent | 8515c242647f41e90726da1e7b4efb7957c923c2 (diff) | |
download | it-tools-34d8e5ce2ca5d7a27c19ee2cb704bbfd3a215b29.tar.gz it-tools-34d8e5ce2ca5d7a27c19ee2cb704bbfd3a215b29.tar.zst it-tools-34d8e5ce2ca5d7a27c19ee2cb704bbfd3a215b29.zip |
feat(new tool): camera screenshot and recorder
Diffstat (limited to 'src/ui/c-button')
-rw-r--r-- | src/ui/c-button/c-button.demo.vue | 2 | ||||
-rw-r--r-- | src/ui/c-button/c-button.theme.ts | 12 | ||||
-rw-r--r-- | src/ui/c-button/c-button.vue | 2 |
3 files changed, 14 insertions, 2 deletions
diff --git a/src/ui/c-button/c-button.demo.vue b/src/ui/c-button/c-button.demo.vue index ce339f5..48576f6 100644 --- a/src/ui/c-button/c-button.demo.vue +++ b/src/ui/c-button/c-button.demo.vue @@ -45,7 +45,7 @@ import _ from 'lodash'; const buttonVariants = ['basic', 'text'] as const; -const buttonTypes = ['default', 'primary', 'warning'] as const; +const buttonTypes = ['default', 'primary', 'warning', 'error'] as const; const buttonSizes = ['small', 'medium', 'large'] as const; </script> diff --git a/src/ui/c-button/c-button.theme.ts b/src/ui/c-button/c-button.theme.ts index 5b4c26f..e2e1591 100644 --- a/src/ui/c-button/c-button.theme.ts +++ b/src/ui/c-button/c-button.theme.ts @@ -61,6 +61,12 @@ const createTheme = ({ style }: { style: 'light' | 'dark' }) => { hoverBackground: lighten(theme.warning.colorFaded, 30), pressedBackground: darken(theme.warning.colorFaded, 30), }), + error: createState({ + textColor: theme.error.color, + backgroundColor: theme.error.colorFaded, + hoverBackground: lighten(theme.error.colorFaded, 30), + pressedBackground: darken(theme.error.colorFaded, 30), + }), }, text: { default: createState({ @@ -81,6 +87,12 @@ const createTheme = ({ style }: { style: 'light' | 'dark' }) => { hoverBackground: theme.warning.colorFaded, pressedBackground: darken(theme.warning.colorFaded, 30), }), + error: createState({ + textColor: darken(theme.error.color, 20), + backgroundColor: 'transparent', + hoverBackground: theme.error.colorFaded, + pressedBackground: darken(theme.error.colorFaded, 30), + }), }, }; }; diff --git a/src/ui/c-button/c-button.vue b/src/ui/c-button/c-button.vue index 121a1e9..24b91b8 100644 --- a/src/ui/c-button/c-button.vue +++ b/src/ui/c-button/c-button.vue @@ -18,7 +18,7 @@ import { useAppTheme } from '../theme/themes'; const props = withDefaults( defineProps<{ - type?: 'default' | 'primary' | 'warning'; + type?: 'default' | 'primary' | 'warning' | 'error'; variant?: 'basic' | 'text'; disabled?: boolean; round?: boolean; |