Skip to content

Commit 13265ac

Browse files
committed
ts: export text mark props type
1 parent 4f81a9e commit 13265ac

File tree

1 file changed

+21
-19
lines changed

1 file changed

+21
-19
lines changed

src/lib/marks/Text.svelte

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,13 @@
1-
<script lang="ts">
2-
import { getContext, type Snippet } from 'svelte';
3-
import GroupMultiple from './helpers/GroupMultiple.svelte';
4-
import type {
5-
PlotContext,
6-
DataRecord,
7-
BaseMarkProps,
8-
ConstantAccessor,
9-
ChannelAccessor
10-
} from '../types.js';
11-
import { resolveProp, resolveStyles } from '../helpers/resolve.js';
12-
import Mark from '../Mark.svelte';
13-
import { sort } from '$lib/index.js';
14-
15-
type TextMarkProps = BaseMarkProps & {
1+
<!--
2+
@component
3+
Useful for adding SVG text labels to your plot.
4+
-->
5+
<script module lang="ts">
6+
export type TextMarkProps = BaseMarkProps & {
167
data: DataRecord[];
178
x: ChannelAccessor;
189
y: ChannelAccessor;
19-
fill?: ChannelAccessor;
20-
stroke?: ChannelAccessor;
2110
children?: Snippet;
22-
dx?: ConstantAccessor<number>;
23-
dy?: ConstantAccessor<number>;
2411
text: ConstantAccessor<string>;
2512
title?: ConstantAccessor<string>;
2613
/**
@@ -42,6 +29,21 @@
4229
| 'bottom-right'
4330
>;
4431
};
32+
</script>
33+
34+
<script lang="ts">
35+
import { getContext, type Snippet } from 'svelte';
36+
import GroupMultiple from './helpers/GroupMultiple.svelte';
37+
import type {
38+
PlotContext,
39+
DataRecord,
40+
BaseMarkProps,
41+
ConstantAccessor,
42+
ChannelAccessor
43+
} from '../types.js';
44+
import { resolveProp, resolveStyles } from '../helpers/resolve.js';
45+
import Mark from '../Mark.svelte';
46+
import { sort } from '$lib/index.js';
4547
4648
let { data = [{}], class: className = null, ...options }: TextMarkProps = $props();
4749

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy