Skip to content

Commit 0e0b9a9

Browse files
authored
Merge pull request #12 from ssssota/bumpup-doc
docs: bumpup
2 parents 908cd0a + 9af9cb9 commit 0e0b9a9

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

packages/svelte-jsx-snippet/README.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ For example: `MyComponent.svelte`
3737

3838
```jsx
3939
import MyComponent from "./MyComponent.svelte";
40-
import $snippet from "svelte-jsx-snippet";
4140
export default {
4241
component: MyComponent,
4342
};
@@ -54,7 +53,6 @@ export const Default = {
5453
import { test, expect } from "vitest";
5554
import { render } from "@testing-library/svelte";
5655
import MyComponent from "./MyComponent.svelte";
57-
import $snippet from "svelte-jsx-snippet";
5856
test("render snippet ", () => {
5957
const { getByText } = render(MyComponent, {
6058
props: {
@@ -69,8 +67,8 @@ test("render snippet ", () => {
6967

7068
```jsx
7169
import MyComponent from "./MyComponent.svelte";
72-
import { jsx } from "svelte-jsx-snippet";
73-
const MyComponent$ = jsx(MyComponent, ["children"]);
70+
import { jsx$ } from "svelte-jsx-snippet";
71+
const MyComponent$ = jsx$(MyComponent, ["children"]);
7472
const snippet = (
7573
<MyComponent$>
7674
<h1>Hello, World!</h1>
@@ -103,8 +101,8 @@ const SnippetComponent = (props: { children?: JSX.Element }) => {
103101
```svelte
104102
<script>
105103
import SnippetComponent from "./SnippetComponent.tsx";
106-
import { svelte } from "svelte-jsx-snippet";
107-
const SnippetComponent$ = svelte(SnippetComponent, ["children"]);
104+
import { svelte$ } from "svelte-jsx-snippet";
105+
const SnippetComponent$ = svelte$(SnippetComponent, ["children"]);
108106
</script>
109107
110108
<SnippetComponent$>

site/src/routes/index.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,17 +43,17 @@ export const Page: FC = () => {
4343
<code>{`{#snippet hello()}\n <h3>Hello, world!</h3> <!-- Svelte -->\n{/snippet}`}</code>
4444
</Pre$>
4545
<h3>
46-
<code>jsx(Component, snippetProps)</code>
46+
<code>jsx$(Component, snippetProps)</code>
4747
</h3>
4848
<p>
49-
<code>jsx</code> function convert a Svelte component to a JSX
49+
<code>jsx$</code> function convert a Svelte component to a JSX
5050
function component.
5151
</p>
5252
<h3>
5353
<code>svelte(Component)</code>
5454
</h3>
5555
<p>
56-
<code>svelte</code> function convert a JSX function component to a
56+
<code>svelte$</code> function convert a JSX function component to a
5757
Svelte component.
5858
</p>
5959
</section>

0 commit comments

Comments
 (0)