Skip to content

Commit

Permalink
refactor(widgets): add defineProps to widget components
Browse files Browse the repository at this point in the history
- Add defineProps import to group, image, mask, path, text-unit, video, and webview components
- This refactor prepares for upcoming prop definitions in widget components
  • Loading branch information
xs10l3 committed Nov 27, 2024
1 parent 4e9e09c commit ebf16c0
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 3 deletions.
1 change: 1 addition & 0 deletions packages/lib/src/widgets/group.vue
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<script setup lang="ts">
import { defineProps } from 'vue'
import { defineWidget } from '@vue-motion/core'
import type { WidgetOptions } from './widget'
import { widget } from './widget'
Expand Down
1 change: 1 addition & 0 deletions packages/lib/src/widgets/image.vue
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<script setup lang="ts">
import { defineProps } from 'vue'
import { defineWidget } from '@vue-motion/core'
import type { FigureMixin, FigureOptions } from './figure'
import { figure } from './figure'
Expand Down
1 change: 1 addition & 0 deletions packages/lib/src/widgets/mask.vue
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<script setup lang="ts">
import { defineProps } from 'vue'
import { defineWidget } from '@vue-motion/core'
import { type WidgetOptions, widget } from './widget'
Expand Down
1 change: 1 addition & 0 deletions packages/lib/src/widgets/path.vue
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<script setup lang="ts">
import { defineProps } from 'vue'
import { defineWidget } from '@vue-motion/core'
import type { FigureMixin, FigureOptions } from './figure'
import { figure } from './figure'
Expand Down
1 change: 1 addition & 0 deletions packages/lib/src/widgets/text-unit.vue
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<script setup lang="ts">
import { defineProps } from 'vue'
import { defineWidget } from '@vue-motion/core'
import type { TextOptions } from './text.vue'
import { figure } from './figure'
Expand Down
1 change: 1 addition & 0 deletions packages/lib/src/widgets/video.vue
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<script setup lang="ts">
import { defineProps } from 'vue'
import { defineWidget, usePlayer } from '@vue-motion/core'
import { ref, watch } from 'vue'
import { type WidgetOptions, widget } from './widget'
Expand Down
8 changes: 5 additions & 3 deletions packages/lib/src/widgets/webview.vue
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<script setup lang="ts">
import { defineProps } from 'vue'
import { defineWidget } from '@vue-motion/core'
import type { WidgetMixin, WidgetOptions } from './widget'
import { widget } from './widget'
Expand All @@ -17,12 +18,13 @@ const options = defineWidget<WebViewOptions>(props)
<g v-bind="widget(options)">
<foreignObject :width="options.width" :height="options.height">
<div
:style="{
color: 'white',
}" xmlns="http://www.w3.org/1999/xhtml"
:style="{
color: 'white',
}" xmlns="http://www.w3.org/1999/xhtml"
>
<slot />
</div>
</foreignObject>
</g>
</template>

0 comments on commit ebf16c0

Please sign in to comment.