Skip to content

Commit 50f487b

Browse files
committed
docs: enhance badges and localization support
- Refactored `Badge` components with tooltip support and added new `ExperimentalBadge` and `VersionBadge` components. - Included `react-tooltip` dependency for badge tooltips and updated `package.json` accordingly. - Improved Chinese and English localization with new translations for badges and documentation labels. - Updated styles to support `warning` badge type. - Adjusted multiple markdown files to use new badges for consistency and usability.
1 parent 66fcae1 commit 50f487b

File tree

23 files changed

+596
-31
lines changed

23 files changed

+596
-31
lines changed

docs/docs/configuration/custom-transformers.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ title: Custom Transformers
44
sidebar_position: 3
55
---
66

7-
import { Badge } from '@site/src/components/Snippets';
7+
import { VersionBadge } from '@site/src/components/Snippets';
88

99
This guide covers how to create custom transformers when the default transformers don't meet your specific needs.
1010

@@ -442,7 +442,7 @@ addCopyAnnotationExclude {
442442

443443
## Others
444444
### MarkName
445-
<Badge type="secondary">Version 0.13.0</Badge>
445+
<VersionBadge version="0.13.0" />
446446

447447
For configuration of `markName` in custom annotations,
448448
refer to [Mark Name](../features/mark-name.md#customize).

docs/docs/features/mark-name.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ sidebar_position: 1
66

77
import Tabs from '@theme/Tabs';
88
import TabItem from '@theme/TabItem';
9-
import { Badge } from '@site/src/components/Snippets';
9+
import { ExperimentalBadge, VersionBadge } from '@site/src/components/Snippets';
1010

11-
<Badge type="primary">Experimental</Badge>
12-
<Badge type="secondary">Version 0.13.0</Badge>
11+
<ExperimentalBadge />
12+
<VersionBadge version="0.13.0" />
1313

1414
You can use `markName` to add a name mark annotation (e.g. `@JvmName`, `@JsName`) to the generated synthetic function.
1515

docs/docs/getting-started.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ sidebar_position: 3
66

77
import Tabs from '@theme/Tabs';
88
import TabItem from '@theme/TabItem';
9-
import { Badge } from '@site/src/components/Snippets';
9+
import { ExperimentalBadge, VersionBadge } from '@site/src/components/Snippets';
1010

1111
This guide will walk you through the basic usage of the Kotlin Suspend Transform Compiler Plugin across different platforms.
1212

@@ -125,8 +125,8 @@ JS platform support was added in version 0.6.0! See the development process at [
125125

126126
## WasmJS Platform
127127

128-
<Badge type="primary">Experimental</Badge>
129-
<Badge type="secondary">Version 0.6.0</Badge>
128+
<ExperimentalBadge />
129+
<VersionBadge version="0.6.0" />
130130

131131
:::warning
132132
The transformer functions mentioned in the WasmJS example below

docs/docs/possibly-useful/wasmjs-limitations.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ title: WasmJS Limitations
44
sidebar_position: 2
55
---
66

7-
import { Badge } from '@site/src/components/Snippets';
7+
import { ExperimentalBadge, VersionBadge } from '@site/src/components/Snippets';
88

9-
<Badge type="primary">Experimental</Badge>
10-
<Badge type="secondary">Version 0.6.0</Badge>
9+
<ExperimentalBadge />
10+
<VersionBadge version="0.6.0" />
1111

1212
WasmJS support is experimental and has several limitations:
1313

0 commit comments

Comments
 (0)