@chayns-components/textstring 5.0.32 → 5.0.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AI_USAGE.md +95 -0
- package/package.json +5 -4
package/AI_USAGE.md
ADDED
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
# @chayns-components/textstring
|
|
2
|
+
|
|
3
|
+
React component package providing `Textstring` for chayns applications.
|
|
4
|
+
|
|
5
|
+
Documented components: `Textstring`.
|
|
6
|
+
|
|
7
|
+
## Import
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
import { Textstring } from '@chayns-components/textstring';
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Typical Usage
|
|
14
|
+
|
|
15
|
+
```tsx
|
|
16
|
+
<Textstring
|
|
17
|
+
childrenTagName={'h1'}
|
|
18
|
+
textstring={{
|
|
19
|
+
fallback: 'Das ist ein Textstring! Pizza ist lecker.',
|
|
20
|
+
name: 'txt_chayns_chaynsComponents_textString_example',
|
|
21
|
+
}}
|
|
22
|
+
/>
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Textstring
|
|
26
|
+
|
|
27
|
+
`Textstring` is exported by `@chayns-components/textstring` and should be imported from the public package entry point.
|
|
28
|
+
|
|
29
|
+
### Import
|
|
30
|
+
|
|
31
|
+
```ts
|
|
32
|
+
import { Textstring } from '@chayns-components/textstring';
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### Examples
|
|
36
|
+
|
|
37
|
+
#### General
|
|
38
|
+
|
|
39
|
+
```tsx
|
|
40
|
+
<Textstring
|
|
41
|
+
childrenTagName={'h1'}
|
|
42
|
+
textstring={{
|
|
43
|
+
fallback: 'Das ist ein Textstring! Pizza ist lecker.',
|
|
44
|
+
name: 'txt_chayns_chaynsComponents_textString_example',
|
|
45
|
+
}}
|
|
46
|
+
/>
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
#### With HTML
|
|
50
|
+
|
|
51
|
+
```tsx
|
|
52
|
+
<Textstring
|
|
53
|
+
textstring={{
|
|
54
|
+
fallback: '<button>Drücke mich!</button>',
|
|
55
|
+
name: 'txt_chayns_chaynsComponents_textString_example_with_html',
|
|
56
|
+
}}
|
|
57
|
+
isTextstringHTML
|
|
58
|
+
/>
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
#### Textstring With Replacement
|
|
62
|
+
|
|
63
|
+
```tsx
|
|
64
|
+
<Textstring />
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
#### Textstring With Styles
|
|
68
|
+
|
|
69
|
+
```tsx
|
|
70
|
+
<Textstring
|
|
71
|
+
childrenTagName={'h1'}
|
|
72
|
+
childrenStyles={{ color: 'rebeccapurple' }}
|
|
73
|
+
textstring={{
|
|
74
|
+
fallback: 'Das ist ein Textstring! Pizza ist lecker.',
|
|
75
|
+
name: 'txt_chayns_chaynsComponents_textString_example',
|
|
76
|
+
}}
|
|
77
|
+
/>
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
### Props
|
|
81
|
+
|
|
82
|
+
No prop documentation available.
|
|
83
|
+
|
|
84
|
+
### Types
|
|
85
|
+
|
|
86
|
+
No additional exported types documented.
|
|
87
|
+
|
|
88
|
+
### Usage Notes
|
|
89
|
+
|
|
90
|
+
- Import `Textstring` directly from `@chayns-components/textstring` instead of internal source paths.
|
|
91
|
+
- Start with one of the documented Storybook examples and adapt the props incrementally for your use case.
|
|
92
|
+
|
|
93
|
+
### Anti Patterns
|
|
94
|
+
|
|
95
|
+
- Avoid imports from internal paths such as `@chayns-components/textstring/src/...`; always use the public package export.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chayns-components/textstring",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.34",
|
|
4
4
|
"description": "A set of beautiful React components for developing your own applications with chayns.",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"browserslist": [
|
|
@@ -33,7 +33,8 @@
|
|
|
33
33
|
"test": "__tests__"
|
|
34
34
|
},
|
|
35
35
|
"files": [
|
|
36
|
-
"lib"
|
|
36
|
+
"lib",
|
|
37
|
+
"AI_USAGE.md"
|
|
37
38
|
],
|
|
38
39
|
"repository": {
|
|
39
40
|
"type": "git",
|
|
@@ -70,7 +71,7 @@
|
|
|
70
71
|
"typescript": "^5.9.3"
|
|
71
72
|
},
|
|
72
73
|
"dependencies": {
|
|
73
|
-
"@chayns-components/core": "^5.0.
|
|
74
|
+
"@chayns-components/core": "^5.0.34"
|
|
74
75
|
},
|
|
75
76
|
"peerDependencies": {
|
|
76
77
|
"chayns-api": ">=2.2.0",
|
|
@@ -82,5 +83,5 @@
|
|
|
82
83
|
"publishConfig": {
|
|
83
84
|
"access": "public"
|
|
84
85
|
},
|
|
85
|
-
"gitHead": "
|
|
86
|
+
"gitHead": "7c7c2d7dacbc7c8031f3bcef885e4f63b8f49b1a"
|
|
86
87
|
}
|