Skip to content

Commit 5a71e5b

Browse files
authored
wip
1 parent dba21b8 commit 5a71e5b

1 file changed

Lines changed: 10 additions & 12 deletions

File tree

README.md

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -441,21 +441,9 @@ Benefits of using JSX:
441441

442442
`Text.tgx` function accepts a JSX element and returns an instance of `Text.Tgx`, which can then be used as a content of a message.
443443

444-
<details>
445-
<summary>How it works?</summary>
446-
447-
JSX is just syntactic sugar transformed by the compiler.
448-
Result of transformation depends on the JSX runtime.
449-
`effect-tg` relies on JSX runtime from [`@grom.js/tgx`](https://github.com/grom-dev/tgx), which transforms JSX elements to `TgxElement` instances.
450-
When `Send.sendMessage` encounters an instance of `Text.Tgx`, it converts inner `TgxElement`s to the parameters for a `send*` method.
451-
452-
</details>
453-
454444
<details>
455445
<summary>How to enable?</summary>
456446

457-
To enable JSX support:
458-
459447
1. Install `@grom.js/tgx` package:
460448

461449
```sh
@@ -475,6 +463,16 @@ To enable JSX support:
475463

476464
</details>
477465

466+
<details>
467+
<summary>How it works?</summary>
468+
469+
JSX is just syntactic sugar transformed by the compiler.
470+
Result of transformation depends on the JSX runtime.
471+
`effect-tg` relies on JSX runtime from [`@grom.js/tgx`](https://github.com/grom-dev/tgx), which transforms JSX elements to `TgxElement` instances.
472+
When `Send.sendMessage` encounters an instance of `Text.Tgx`, it converts inner `TgxElement`s to the parameters for a `send*` method.
473+
474+
</details>
475+
478476
**Example:** Composing reusable messages with JSX.
479477

480478
```tsx

0 commit comments

Comments
 (0)