@startupjs-ui/content 0.1.13 → 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 +8 -0
- package/README.mdx +10 -11
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
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/content
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
6
14
|
## [0.1.13](https://github.com/startupjs/startupjs-ui/compare/v0.1.12...v0.1.13) (2026-02-03)
|
|
7
15
|
|
|
8
16
|
**Note:** Version bump only for package @startupjs-ui/content
|
package/README.mdx
CHANGED
|
@@ -8,10 +8,9 @@ import './index.mdx.cssx.styl'
|
|
|
8
8
|
|
|
9
9
|
# Content
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
A parent container for the main content area of your app or website. You can pass custom `style` to the root element and provide content as `children`.
|
|
12
12
|
|
|
13
|
-
It
|
|
14
|
-
to what is usually considered a comfortable reading width - `768px`, which is roughly the width of a tablet in portrait mode.
|
|
13
|
+
It applies sensible default horizontal padding and limits the maximum width to what is generally considered a comfortable reading width -- `768px` (roughly the width of a tablet in portrait mode).
|
|
15
14
|
|
|
16
15
|
```jsx
|
|
17
16
|
import { Content } from 'startupjs-ui'
|
|
@@ -19,7 +18,7 @@ import { Content } from 'startupjs-ui'
|
|
|
19
18
|
|
|
20
19
|
## Simple Example
|
|
21
20
|
|
|
22
|
-
By default
|
|
21
|
+
By default, Content has left and right padding of `16px`.
|
|
23
22
|
|
|
24
23
|
```jsx example
|
|
25
24
|
const contentStyle = {
|
|
@@ -42,11 +41,9 @@ return (
|
|
|
42
41
|
|
|
43
42
|
## No horizontal paddings
|
|
44
43
|
|
|
45
|
-
Pass `pure`
|
|
46
|
-
limiting the maximum width of the Content (`768px` by default) while handling the internal paddings yourself.
|
|
44
|
+
Pass the `pure` prop to remove the left and right padding. This keeps the maximum width constraint (`768px` by default) while letting you handle internal padding yourself.
|
|
47
45
|
|
|
48
|
-
This is useful
|
|
49
|
-
all the way from left to right. While on the bigger screens you would still want to limit the maximum width of the content.
|
|
46
|
+
This is useful for lists, tables, or other components that need to span edge-to-edge on small screens, while still limiting the maximum content width on larger screens.
|
|
50
47
|
|
|
51
48
|
```jsx example
|
|
52
49
|
const contentStyle = {
|
|
@@ -69,7 +66,7 @@ return (
|
|
|
69
66
|
|
|
70
67
|
## Vertical paddings
|
|
71
68
|
|
|
72
|
-
|
|
69
|
+
Pass the `padding` prop to add equal top and bottom padding. When set to `true`, it uses a default spacing value. You can also pass a number to specify a custom padding amount.
|
|
73
70
|
|
|
74
71
|
```jsx example
|
|
75
72
|
const contentStyle = {
|
|
@@ -92,7 +89,7 @@ return (
|
|
|
92
89
|
|
|
93
90
|
## Full space
|
|
94
91
|
|
|
95
|
-
|
|
92
|
+
The `full` prop makes the Content expand to fill all available space along the parent's main flexbox axis.
|
|
96
93
|
|
|
97
94
|
```jsx example
|
|
98
95
|
const divStyle = {
|
|
@@ -123,7 +120,9 @@ return (
|
|
|
123
120
|
|
|
124
121
|
## Max width
|
|
125
122
|
|
|
126
|
-
Content
|
|
123
|
+
By default, Content limits its max-width to `768px` (the `'tablet'` preset). Since the layout is mobile-first, you can scale up to larger screens using the `width` prop. The available presets are: `'mobile'`, `'tablet'` (default), `'desktop'`, `'wide'`, and `'full'`. See the Sandbox section below to try each one.
|
|
124
|
+
|
|
125
|
+
You can also change the default width for all Content components app-wide by overriding `$UI.Content.defaultWidth` in your styles. **Changing the default width is an advanced setting that affects your entire app -- use with caution.**
|
|
127
126
|
|
|
128
127
|
```jsx example
|
|
129
128
|
const contentStyle = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@startupjs-ui/content",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.16",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -9,12 +9,12 @@
|
|
|
9
9
|
"type": "module",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@startupjs-ui/core": "^0.1.11",
|
|
12
|
-
"@startupjs-ui/div": "^0.1.
|
|
12
|
+
"@startupjs-ui/div": "^0.1.16"
|
|
13
13
|
},
|
|
14
14
|
"peerDependencies": {
|
|
15
15
|
"react": "*",
|
|
16
16
|
"react-native": "*",
|
|
17
17
|
"startupjs": "*"
|
|
18
18
|
},
|
|
19
|
-
"gitHead": "
|
|
19
|
+
"gitHead": "9943aa3566d5d80f5b404473906eb3c0611f9ee5"
|
|
20
20
|
}
|