@startupjs-ui/span 0.1.12 → 0.1.16
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/CHANGELOG.md +16 -0
- package/README.mdx +19 -5
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,22 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [0.1.16](https://github.com/startupjs/startupjs-ui/compare/v0.1.15...v0.1.16) (2026-02-10)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @startupjs-ui/span
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## [0.1.13](https://github.com/startupjs/startupjs-ui/compare/v0.1.12...v0.1.13) (2026-02-03)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @startupjs-ui/span
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
6
22
|
## [0.1.12](https://github.com/startupjs/startupjs-ui/compare/v0.1.11...v0.1.12) (2026-01-21)
|
|
7
23
|
|
|
8
24
|
|
package/README.mdx
CHANGED
|
@@ -6,7 +6,7 @@ import { Sandbox } from '@startupjs-ui/docs'
|
|
|
6
6
|
|
|
7
7
|
# Span
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Span is the base typography component for rendering plain text. It extends React Native's `Text` component and adds shortcuts for headings, bold, italic, and description styles.
|
|
10
10
|
|
|
11
11
|
```jsx
|
|
12
12
|
import { Span } from 'startupjs-ui'
|
|
@@ -20,7 +20,7 @@ import { Span } from 'startupjs-ui'
|
|
|
20
20
|
|
|
21
21
|
## Headers
|
|
22
22
|
|
|
23
|
-
Use `h1`
|
|
23
|
+
Use the `h1` through `h6` props to render text as a heading. On web, the appropriate accessibility role is set automatically.
|
|
24
24
|
|
|
25
25
|
```jsx example
|
|
26
26
|
<Span h1>H1 Heading</Span>
|
|
@@ -41,7 +41,7 @@ Use `h1` - `h6` props to create headers.
|
|
|
41
41
|
|
|
42
42
|
## Description
|
|
43
43
|
|
|
44
|
-
Use `description` prop
|
|
44
|
+
Use the `description` prop to apply a secondary text color, suitable for captions and helper text.
|
|
45
45
|
|
|
46
46
|
```jsx example
|
|
47
47
|
<Span description>Description text</Span>
|
|
@@ -49,9 +49,9 @@ Use `description` prop for secondary text.
|
|
|
49
49
|
|
|
50
50
|
## Animations
|
|
51
51
|
|
|
52
|
-
|
|
52
|
+
Span automatically uses React Native Reanimated when a `transition` or `animation` property is detected in the style. This allows you to create smooth animations without any additional setup.
|
|
53
53
|
|
|
54
|
-
**Note:** When using modifier classes to add transitions/animations dynamically, set `animation: none` in the base styles. This ensures
|
|
54
|
+
**Note:** When using modifier classes to add transitions/animations dynamically, set `animation: none` in the base styles. This ensures Span uses the animated component from the start.
|
|
55
55
|
|
|
56
56
|
```jsx example
|
|
57
57
|
const [isActive, setIsActive] = useState(false)
|
|
@@ -97,6 +97,20 @@ styl`
|
|
|
97
97
|
`
|
|
98
98
|
```
|
|
99
99
|
|
|
100
|
+
## Props
|
|
101
|
+
|
|
102
|
+
Span extends React Native's `TextProps`, so all standard Text props are supported in addition to the following:
|
|
103
|
+
|
|
104
|
+
- **children** -- the text content to render
|
|
105
|
+
- **bold** -- render text in bold
|
|
106
|
+
- **italic** -- render text in italic
|
|
107
|
+
- **description** -- apply a secondary text color for captions or helper text
|
|
108
|
+
- **full** -- expand to full width (`flex: 1`)
|
|
109
|
+
- **h1** through **h6** -- render text as a heading of the specified level
|
|
110
|
+
- **theme** -- apply a named theme
|
|
111
|
+
- **style** -- custom text styles
|
|
112
|
+
- **ref** -- ref to access the underlying `Text` element
|
|
113
|
+
|
|
100
114
|
## Sandbox
|
|
101
115
|
|
|
102
116
|
<Sandbox
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@startupjs-ui/span",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.16",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -16,5 +16,5 @@
|
|
|
16
16
|
"react-native-reanimated": ">=4.0.0",
|
|
17
17
|
"startupjs": "*"
|
|
18
18
|
},
|
|
19
|
-
"gitHead": "
|
|
19
|
+
"gitHead": "9943aa3566d5d80f5b404473906eb3c0611f9ee5"
|
|
20
20
|
}
|