Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion packages/elements/src/node/Node.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,14 @@ interface NodeProps {

const props = defineProps<NodeProps>()
const delegatedProps = reactiveOmit(props, 'class')

const nodeClass = computed(() => cn('node-container relative size-full h-auto w-sm gap-0 rounded-md p-0', props.class))
</script>

<template>
<Card
v-bind="delegatedProps"
:class="cn('node-container relative size-full h-auto w-sm gap-0 rounded-md p-0', props.class)"
:class="nodeClass"
>
<Handle v-if="props.handles?.target" :position="Position.Left" type="target" />
<Handle v-if="props.handles?.source" :position="Position.Right" type="source" />
Expand Down
3 changes: 2 additions & 1 deletion packages/elements/src/node/NodeFooter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@ import { cn } from '@repo/shadcn-vue/lib/utils'
const props = defineProps<{
class?: HTMLAttributes['class']
}>()
const className = computed(() => cn('rounded-b-md border-t bg-secondary p-3!', props.class))
</script>

<template>
<CardFooter :class="cn('rounded-b-md border-t bg-secondary p-3!', props.class)">
<CardFooter :class="className">
<slot />
</CardFooter>
</template>
3 changes: 2 additions & 1 deletion packages/elements/src/node/NodeHeader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@ import { cn } from '@repo/shadcn-vue/lib/utils'
const props = defineProps<{
class?: HTMLAttributes['class']
}>()
const className = computed(() => cn('gap-0.5 rounded-t-md border-b bg-secondary p-3!', props.class))
</script>

<template>
<CardHeader :class="cn('gap-0.5 rounded-t-md border-b bg-secondary p-3!', props.class)">
<CardHeader :class="className">
<slot />
</CardHeader>
</template>