Skip to content

Commit 243fc23

Browse files
committed
docs: update README
1 parent 1bd672b commit 243fc23

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

README.md

+10-4
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ import type { SvelteHTMLElements } from "svelte/elements";
4343

4444
type RestProps = SvelteHTMLElements["button"];
4545

46-
export interface ButtonProps extends RestProps {
46+
type $Props = {
4747
/**
4848
* @default "button"
4949
*/
@@ -53,7 +53,11 @@ export interface ButtonProps extends RestProps {
5353
* @default false
5454
*/
5555
primary?: boolean;
56-
}
56+
57+
[key: `data-${string}`]: any;
58+
};
59+
60+
export type ButtonProps = Omit<RestProps, keyof $Props> & $Props;
5761

5862
export default class Button extends SvelteComponentTyped<
5963
ButtonProps,
@@ -83,7 +87,7 @@ import type { SvelteHTMLElements } from "svelte/elements";
8387

8488
type RestProps = SvelteHTMLElements["button"];
8589

86-
export interface ButtonProps extends RestProps {
90+
type $Props = {
8791
/**
8892
* @default "button"
8993
*/
@@ -94,7 +98,9 @@ export interface ButtonProps extends RestProps {
9498
* @default false
9599
*/
96100
primary?: boolean;
97-
}
101+
};
102+
103+
export type ButtonProps = Omit<RestProps, keyof $Props> & $Props;
98104

99105
export default class Button extends SvelteComponentTyped<
100106
ButtonProps,

0 commit comments

Comments
 (0)