NodeRule
Creates a style rule for nodes.
Props
nodeAttributes
type:
nodeAttributesdefault:
{}The attributes to apply to the nodes.
selector
type:
(node:Node) => Booleandefault:
() => trueThe selector function to apply to the nodes.
Example
vue
<template>
...
<NodeRule :selector="rule.selector" :attributes="rule.attributes" />
...
</template>
<script setup lang="ts">
import { NodeRule, NodeRuleProps } from "@linkurious/ogma-vue";
const rule = ref<NodeRuleProps>({
attributes: {
color: "blue",
},
selector: () => true,
});
</script>