chore: switch away from reactivity transform
also use a released version of nuxt
This commit is contained in:
@@ -1,30 +1,21 @@
|
||||
<script setup lang="ts">
|
||||
import type { Color, ViewportLength } from "csstype";
|
||||
|
||||
// fix ReferenceError: _unref is not defined
|
||||
// https://github.com/nuxt/framework/issues/5546
|
||||
import { unref as _unref } from "vue";
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
href?: string;
|
||||
id?: string;
|
||||
color?: Color;
|
||||
darkcolor?: Color;
|
||||
title?: string;
|
||||
clearstyles?: boolean;
|
||||
forceheight?: ViewportLength<"rem">;
|
||||
}>(),
|
||||
{ color: "pink", darkcolor: "#c88994", clearstyles: false }
|
||||
);
|
||||
|
||||
const {
|
||||
href,
|
||||
id,
|
||||
color = "pink",
|
||||
darkcolor = "#c88994",
|
||||
title,
|
||||
clearstyles = false,
|
||||
forceheight,
|
||||
} = defineProps<{
|
||||
href?: string;
|
||||
id?: string;
|
||||
color?: Color;
|
||||
darkcolor?: Color;
|
||||
title?: string;
|
||||
clearstyles?: boolean;
|
||||
forceheight?: ViewportLength<"rem">;
|
||||
}>();
|
||||
|
||||
const padding = clearstyles ? "0" : "1rem";
|
||||
const height = forceheight ?? "100%";
|
||||
const padding = props.clearstyles ? "0" : "1rem";
|
||||
const height = props.forceheight ?? "100%";
|
||||
|
||||
// v-bind DOES NOT WORK on initial render
|
||||
// so unfortunately we have to use the old way
|
||||
@@ -32,8 +23,8 @@ const height = forceheight ?? "100%";
|
||||
const cssVars = {
|
||||
"--padding": padding,
|
||||
"--height": height,
|
||||
"--color": color,
|
||||
"--darkcolor": darkcolor,
|
||||
"--color": props.color,
|
||||
"--darkcolor": props.darkcolor,
|
||||
};
|
||||
</script>
|
||||
|
||||
|
Reference in New Issue
Block a user