aboutsummaryrefslogtreecommitdiff
path: root/src/ui
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/c-modal/c-modal.vue10
-rw-r--r--src/ui/color/color.models.ts2
2 files changed, 7 insertions, 5 deletions
diff --git a/src/ui/c-modal/c-modal.vue b/src/ui/c-modal/c-modal.vue
index af92f01..4d032bb 100644
--- a/src/ui/c-modal/c-modal.vue
+++ b/src/ui/c-modal/c-modal.vue
@@ -1,11 +1,17 @@
<script setup lang="ts">
import { useTheme } from './c-modal.theme';
+defineOptions({
+ inheritAttrs: false,
+});
+
const props = withDefaults(defineProps<{ open?: boolean; centered?: boolean }>(), {
open: false,
centered: true,
});
+
const emit = defineEmits(['update:open']);
+
const isOpen = useVModel(props, 'open', emit, { passive: true });
const { centered } = toRefs(props);
@@ -29,10 +35,6 @@ defineExpose({
isOpen,
});
-defineOptions({
- inheritAttrs: false,
-});
-
const theme = useTheme();
const modal = ref();
diff --git a/src/ui/color/color.models.ts b/src/ui/color/color.models.ts
index 5b4c79b..0ae38a4 100644
--- a/src/ui/color/color.models.ts
+++ b/src/ui/color/color.models.ts
@@ -4,7 +4,7 @@ const clampHex = (value: number) => Math.max(0, Math.min(255, Math.round(value))
function lighten(color: string, amount: number): string {
const alpha = color.length === 9 ? color.slice(7) : '';
- const num = parseInt(color.slice(1, 7), 16);
+ const num = Number.parseInt(color.slice(1, 7), 16);
const r = clampHex(((num >> 16) & 255) + amount);
const g = clampHex(((num >> 8) & 255) + amount);