@star-insure/sdk 5.0.7 → 5.0.9
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/dist/components/filter/Action.d.ts +1 -1
- package/dist/sdk.cjs.development.js +6 -1
- package/dist/sdk.cjs.development.js.map +1 -1
- package/dist/sdk.cjs.production.min.js +1 -1
- package/dist/sdk.cjs.production.min.js.map +1 -1
- package/dist/sdk.esm.js +6 -1
- package/dist/sdk.esm.js.map +1 -1
- package/dist/types/api/auth.d.ts +1 -0
- package/dist/types/misc/index.d.ts +2 -0
- package/package.json +1 -1
- package/src/components/filter/Action.tsx +5 -2
- package/src/types/api/auth.ts +1 -0
- package/src/types/misc/index.ts +2 -0
package/dist/types/api/auth.d.ts
CHANGED
|
@@ -27,6 +27,8 @@ export declare type TPageHeaderAction = {
|
|
|
27
27
|
type?: 'button' | 'submit';
|
|
28
28
|
hidden?: boolean;
|
|
29
29
|
shortcutKey?: string;
|
|
30
|
+
backgroundColor?: string;
|
|
31
|
+
textColor?: string;
|
|
30
32
|
actions?: TPageHeaderInnerAction[];
|
|
31
33
|
};
|
|
32
34
|
export declare type TPageHeaderInnerAction = {
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@star-insure/sdk",
|
|
3
3
|
"description": "The SDK for Star Insure client apps with shared helper functions and TypeScript definitions.",
|
|
4
4
|
"author": "alexclark_nz",
|
|
5
|
-
"version": "5.0.
|
|
5
|
+
"version": "5.0.9",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
|
@@ -4,9 +4,12 @@ import { Link, router } from "@inertiajs/react";
|
|
|
4
4
|
import { TPageHeaderAction } from "../../types";
|
|
5
5
|
import {useClickOutside} from "../../lib";
|
|
6
6
|
|
|
7
|
-
export default function Action({ title, href, as = 'Link', target = '_self', type, onClick = () => {}, shortcutKey, actions }: TPageHeaderAction) {
|
|
7
|
+
export default function Action({ title, href, as = 'Link', target = '_self', type, onClick = () => {}, shortcutKey, backgroundColor, textColor, actions }: TPageHeaderAction) {
|
|
8
|
+
const backgroundColorClass = backgroundColor ? `bg-${backgroundColor}` : 'bg-white';
|
|
9
|
+
const textColorClass = textColor ? `text-${textColor}` : '';
|
|
10
|
+
const colorClass = (`${backgroundColorClass} ${textColorClass}`).trim();
|
|
8
11
|
const className =
|
|
9
|
-
'
|
|
12
|
+
colorClass + ' rounded-full font-bold px-4 py-1.5 text-sm whitespace-nowrap hover:bg-gray-100 hover:border-gray-400 transition-colors border border-gray-300';
|
|
10
13
|
|
|
11
14
|
const tooltipId = `action-${title}`;
|
|
12
15
|
const tooltipContent = shortcutKey ? `Ctrl + ${shortcutKey}` : undefined;
|
package/src/types/api/auth.ts
CHANGED