@startupjs-ui/alert 0.1.13 → 0.1.19

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.
Files changed (3) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/README.mdx +18 -14
  3. package/package.json +6 -6
package/CHANGELOG.md CHANGED
@@ -3,6 +3,25 @@
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.19](https://github.com/startupjs/startupjs-ui/compare/v0.1.18...v0.1.19) (2026-03-17)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **docs:** don't load all icons to keep bundle small ([#17](https://github.com/startupjs/startupjs-ui/issues/17)) ([d7eb70b](https://github.com/startupjs/startupjs-ui/commit/d7eb70bc11f5b15923f2e43b7ef1f86ea066494e))
12
+
13
+
14
+
15
+
16
+
17
+ ## [0.1.16](https://github.com/startupjs/startupjs-ui/compare/v0.1.15...v0.1.16) (2026-02-10)
18
+
19
+ **Note:** Version bump only for package @startupjs-ui/alert
20
+
21
+
22
+
23
+
24
+
6
25
  ## [0.1.13](https://github.com/startupjs/startupjs-ui/compare/v0.1.12...v0.1.13) (2026-02-03)
7
26
 
8
27
  **Note:** Version bump only for package @startupjs-ui/alert
package/README.mdx CHANGED
@@ -4,17 +4,22 @@ import Alert, { _PropsJsonSchema as AlertPropsJsonSchema } from './index'
4
4
  import Br from '@startupjs-ui/br'
5
5
  import Button from '@startupjs-ui/button'
6
6
  import Div from '@startupjs-ui/div'
7
- import { faFire } from '@fortawesome/free-solid-svg-icons'
7
+ import { faFire } from '@fortawesome/free-solid-svg-icons/faFire'
8
8
 
9
9
  # Alert
10
10
 
11
- An alert displays a short, important message in a way that attracts the user's attention without interrupting the user's task.
11
+ An alert displays a short, important message that attracts the user's attention without interrupting their current task.
12
12
 
13
13
  ```jsx
14
14
  import { Alert } from 'startupjs-ui'
15
15
  ```
16
16
 
17
17
  ## Simple example
18
+
19
+ You can pass custom `style` to the root element and provide content as `children` (the `label` prop is deprecated -- use `children` instead).
20
+
21
+ By default, the alert uses the `info` variant and displays a matching icon automatically.
22
+
18
23
  ```jsx example
19
24
  return (
20
25
  <Alert>
@@ -25,7 +30,7 @@ return (
25
30
 
26
31
  ## Variants
27
32
 
28
- The alert offers four severity levels that set a distinctive icon and color: `success`, `info`, `warning`, `error`. You can specify it by passing `variant` property.
33
+ The alert offers four severity levels, each with its own icon and color: `info`, `success`, `warning`, and `error`. Use the `variant` prop to set the severity level.
29
34
 
30
35
  ```jsx example
31
36
  return (
@@ -35,11 +40,11 @@ return (
35
40
  </Alert>
36
41
  <Br />
37
42
  <Alert variant='success'>
38
- This is an success alert — check it out!
43
+ This is a success alert — check it out!
39
44
  </Alert>
40
45
  <Br />
41
46
  <Alert variant='warning'>
42
- This is an warning alert — check it out!
47
+ This is a warning alert — check it out!
43
48
  </Alert>
44
49
  <Br />
45
50
  <Alert variant='error'>
@@ -51,7 +56,7 @@ return (
51
56
 
52
57
  ## Title
53
58
 
54
- You can use the `title` property to display the title above the content.
59
+ Use the `title` prop to display a bold heading above the alert content.
55
60
 
56
61
  ```jsx example
57
62
  return (
@@ -67,14 +72,14 @@ return (
67
72
  variant='success'
68
73
  title='Success'
69
74
  >
70
- This is an success alert — check it out!
75
+ This is a success alert — check it out!
71
76
  </Alert>
72
77
  <Br />
73
78
  <Alert
74
79
  variant='warning'
75
80
  title='Warning'
76
81
  >
77
- This is an warning alert — check it out!
82
+ This is a warning alert — check it out!
78
83
  </Alert>
79
84
  <Br />
80
85
  <Alert
@@ -87,12 +92,11 @@ return (
87
92
  )
88
93
  ```
89
94
 
90
-
91
95
  ## Icons
92
- The `icon` property allows you to change the icon at the beginning of the component.
93
- The `variant` prop defines the corresponding color for the icon.
94
96
 
95
- Setting the `icon` property to `false` will completely remove the icon.
97
+ Use the `icon` prop to replace the default icon with a custom one. The icon color is determined by the `variant`.
98
+
99
+ Set `icon` to `false` to hide the icon entirely.
96
100
 
97
101
  ```jsx example
98
102
  return (
@@ -116,7 +120,7 @@ return (
116
120
 
117
121
  ## Actions
118
122
 
119
- An alert can have an action (`onClose` prop). It is rendered after the message, at the end of the alert.
123
+ An alert can include a close button by providing the `onClose` prop. The close button appears at the end of the alert.
120
124
 
121
125
  ```jsx example
122
126
  const [showFirstAlert, setShowFirstAlert] = useState(true)
@@ -141,7 +145,7 @@ return (
141
145
  )
142
146
  ```
143
147
 
144
- The `renderActions` prop can be used to provide an alternative action.
148
+ For a fully custom action area, use the `renderActions` prop to provide your own component.
145
149
 
146
150
  ```jsx example
147
151
  const [showSecondAlert, setShowSecondAlert] = useState(true)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@startupjs-ui/alert",
3
- "version": "0.1.13",
3
+ "version": "0.1.19",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -8,15 +8,15 @@
8
8
  "types": "index.d.ts",
9
9
  "type": "module",
10
10
  "dependencies": {
11
- "@startupjs-ui/core": "^0.1.11",
12
- "@startupjs-ui/div": "^0.1.13",
13
- "@startupjs-ui/icon": "^0.1.13",
14
- "@startupjs-ui/span": "^0.1.13"
11
+ "@startupjs-ui/core": "^0.1.19",
12
+ "@startupjs-ui/div": "^0.1.19",
13
+ "@startupjs-ui/icon": "^0.1.19",
14
+ "@startupjs-ui/span": "^0.1.19"
15
15
  },
16
16
  "peerDependencies": {
17
17
  "react": "*",
18
18
  "react-native": "*",
19
19
  "startupjs": "*"
20
20
  },
21
- "gitHead": "5cfdccf2bdae3873e968289a3e6b938fad02101a"
21
+ "gitHead": "bfcca786dc363f42a09b6eef4feb7ca8139302fc"
22
22
  }