@reykjavik/webtools 0.3.9 → 0.3.10
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 +4 -4
- package/README.md +5 -3
- package/alertsStore/react.d.ts +1 -0
- package/esm/alertsStore/react.d.ts +1 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,19 +4,19 @@
|
|
|
4
4
|
|
|
5
5
|
- ... <!-- Add new lines here. -->
|
|
6
6
|
|
|
7
|
-
## 0.3.
|
|
7
|
+
## 0.3.10
|
|
8
8
|
|
|
9
9
|
_2026-03-16_
|
|
10
10
|
|
|
11
11
|
- `@reykjavik/webtools/alertsStore/react`:
|
|
12
|
-
-
|
|
12
|
+
- fix: Add missing `onClick` prop to `LinkRendererProps`
|
|
13
13
|
|
|
14
|
-
## 0.3.7 – 0.3.
|
|
14
|
+
## 0.3.7 – 0.3.9
|
|
15
15
|
|
|
16
16
|
_2026-03-16_
|
|
17
17
|
|
|
18
18
|
- feat: Add `@reykjavik/webtools/alertsStore` for toasts and other global UI
|
|
19
|
-
feedback messages along with
|
|
19
|
+
feedback messages along with helpers
|
|
20
20
|
|
|
21
21
|
## 0.3.6
|
|
22
22
|
|
package/README.md
CHANGED
|
@@ -1164,15 +1164,17 @@ import { Toast } from '../components/Toast';
|
|
|
1164
1164
|
#### `renderAlertMessage`
|
|
1165
1165
|
|
|
1166
1166
|
**Syntax:**
|
|
1167
|
-
`renderAlertMessage(message: AlertInfo['message'],
|
|
1167
|
+
`renderAlertMessage(message: AlertInfo['message'], onLinkClick?: (e: MouseEvent) => void, linkComponent?: renderAlertMessage.LinkRenderer): ReactNode`
|
|
1168
1168
|
|
|
1169
1169
|
Helper to render an alerter alert message, which can be a simple string or a
|
|
1170
1170
|
more complex array of strings and objects representing links and rich (bold)
|
|
1171
1171
|
text formatting.
|
|
1172
1172
|
|
|
1173
|
+
You can optionally pass an additional `onLinkClick` handler as a second
|
|
1174
|
+
parameter. (For example the alert's `dismiss` dispatcher.)
|
|
1175
|
+
|
|
1173
1176
|
It renders link objects as simple `<a href="" />` elements, by default, but
|
|
1174
|
-
you can optionally provide a custom `linkComponent` as a
|
|
1175
|
-
with an additional `onLinkClick` handler for the links.
|
|
1177
|
+
you can optionally provide a custom `linkComponent` as a third parameter.
|
|
1176
1178
|
|
|
1177
1179
|
Third
|
|
1178
1180
|
|
package/alertsStore/react.d.ts
CHANGED
|
@@ -31,6 +31,7 @@ export declare namespace renderAlertMessage {
|
|
|
31
31
|
type LinkRendererProps = Omit<Extract<AlertMessage[number], {
|
|
32
32
|
tag: 'a';
|
|
33
33
|
}>, 'tag' | 'text'> & {
|
|
34
|
+
onClick?: (e: MouseEvent) => void;
|
|
34
35
|
children: ReactNode;
|
|
35
36
|
};
|
|
36
37
|
export type LinkRenderer = (props: LinkRendererProps) => ReactNode;
|
|
@@ -31,6 +31,7 @@ export declare namespace renderAlertMessage {
|
|
|
31
31
|
type LinkRendererProps = Omit<Extract<AlertMessage[number], {
|
|
32
32
|
tag: 'a';
|
|
33
33
|
}>, 'tag' | 'text'> & {
|
|
34
|
+
onClick?: (e: MouseEvent) => void;
|
|
34
35
|
children: ReactNode;
|
|
35
36
|
};
|
|
36
37
|
export type LinkRenderer = (props: LinkRendererProps) => ReactNode;
|
package/package.json
CHANGED