chore: lint files
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
<script lang="ts" setup>
|
||||
import { templateRef } from '@vueuse/core'
|
||||
import type { Elements, FlowInstance } from '@braks/vue-flow'
|
||||
import { VueFlow } from '@braks/vue-flow'
|
||||
import RGBNode from './RGBNode.vue'
|
||||
import RGBOutputNode from './RGBOutputNode.vue'
|
||||
import { Elements, FlowInstance, VueFlow } from '@braks/vue-flow'
|
||||
|
||||
type Colors = {
|
||||
interface Colors {
|
||||
red: number
|
||||
green: number
|
||||
blue: number
|
||||
@@ -31,6 +32,7 @@ const color = ref<Colors>({
|
||||
})
|
||||
const onChange = ({ color: c, val }: { color: keyof Colors; val: number }) => (color.value[c] = Number(val))
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div ref="page" class="demo-flow">
|
||||
<VueFlow v-model="elements" @pane-ready="onLoad">
|
||||
@@ -43,6 +45,7 @@ const onChange = ({ color: c, val }: { color: keyof Colors; val: number }) => (c
|
||||
</VueFlow>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style>
|
||||
.demo-flow {
|
||||
display: flex;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<script lang="ts" setup>
|
||||
import { CSSProperties } from 'vue'
|
||||
import { Handle, NodeProps, Position } from '@braks/vue-flow'
|
||||
import type { CSSProperties } from 'vue'
|
||||
import type { NodeProps } from '@braks/vue-flow'
|
||||
import { Handle, Position } from '@braks/vue-flow'
|
||||
|
||||
interface RGBNodeProps extends NodeProps {
|
||||
data: {
|
||||
@@ -37,6 +38,7 @@ const colorVal = computed({
|
||||
|
||||
const style = { '--color': color } as CSSProperties
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="wrapper">
|
||||
<div class="text-md" :style="{ color }">{{ `${color} Amount`.toUpperCase() }}</div>
|
||||
@@ -44,6 +46,7 @@ const style = { '--color': color } as CSSProperties
|
||||
<Handle type="source" :position="Position.Right" :style="{ backgroundColor: color }" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style>
|
||||
.wrapper {
|
||||
padding: 16px;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<script lang="ts" setup>
|
||||
import { Handle, NodeProps, Position } from '@braks/vue-flow'
|
||||
import type { NodeProps } from '@braks/vue-flow'
|
||||
import { Handle, Position } from '@braks/vue-flow'
|
||||
|
||||
interface RBGOutputNodeProps extends NodeProps {
|
||||
rgb: string
|
||||
@@ -7,12 +8,14 @@ interface RBGOutputNodeProps extends NodeProps {
|
||||
|
||||
const props = defineProps<RBGOutputNodeProps>()
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div :style="{ backgroundColor: props.rgb }" class="rgb-output-node">
|
||||
<div class="text-md uppercase">{{ props.rgb }}</div>
|
||||
<Handle type="target" :position="Position.Left" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style>
|
||||
.rgb-output-node {
|
||||
padding: 9px;
|
||||
|
||||
Reference in New Issue
Block a user