@sikka/hawa 0.0.120 → 0.0.121
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.
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
type HawaAppLayoutTypes = {
|
|
3
|
-
logoLink: string;
|
|
4
3
|
drawerItems: {
|
|
5
4
|
label: string;
|
|
6
5
|
icon: any;
|
|
7
6
|
slug: string;
|
|
8
7
|
action: () => void;
|
|
9
8
|
}[];
|
|
10
|
-
currentPage
|
|
9
|
+
currentPage: string;
|
|
10
|
+
logoSymbol?: any;
|
|
11
|
+
logoLink?: string;
|
|
12
|
+
logoText?: any;
|
|
13
|
+
children?: any;
|
|
11
14
|
};
|
|
12
15
|
export declare const HawaAppLayout: React.FunctionComponent<HawaAppLayoutTypes>;
|
|
13
16
|
export {};
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@ type StatTypes = {
|
|
|
11
11
|
handleClick?: () => void
|
|
12
12
|
}
|
|
13
13
|
export const HawaStats: React.FunctionComponent<StatTypes> = (props) => {
|
|
14
|
-
let defaultStyle = "flex flex-col gap-1 rounded-lg p-4 text-sm"
|
|
14
|
+
let defaultStyle = "flex flex-col gap-1 rounded-lg p-4 text-sm max-h-fit"
|
|
15
15
|
let statStyles = {
|
|
16
16
|
plain: "",
|
|
17
17
|
contained: "bg-primary-200 w-fit",
|
|
@@ -2,15 +2,17 @@ import clsx from "clsx"
|
|
|
2
2
|
import React, { useState } from "react"
|
|
3
3
|
|
|
4
4
|
type HawaAppLayoutTypes = {
|
|
5
|
-
logoLink: string
|
|
6
5
|
drawerItems: { label: string; icon: any; slug: string; action: () => void }[]
|
|
7
|
-
currentPage
|
|
6
|
+
currentPage: string
|
|
7
|
+
logoSymbol?: any
|
|
8
|
+
logoLink?: string
|
|
9
|
+
logoText?: any
|
|
10
|
+
children?: any
|
|
8
11
|
}
|
|
9
12
|
export const HawaAppLayout: React.FunctionComponent<HawaAppLayoutTypes> = (
|
|
10
13
|
props: any
|
|
11
14
|
) => {
|
|
12
15
|
const [openSideMenu, setOpenSideMenu] = useState(false)
|
|
13
|
-
|
|
14
16
|
return (
|
|
15
17
|
<div className="flex">
|
|
16
18
|
<div
|
|
@@ -19,9 +21,9 @@ export const HawaAppLayout: React.FunctionComponent<HawaAppLayoutTypes> = (
|
|
|
19
21
|
className="top-0 z-10 flex h-screen w-12 flex-col gap-0 bg-blue-300 transition-all hover:w-40"
|
|
20
22
|
>
|
|
21
23
|
<div className="m-1 flex flex-row bg-red-300 p-2">
|
|
22
|
-
<div>
|
|
24
|
+
<div>{props.logoSymbol}</div>
|
|
23
25
|
<div className={openSideMenu ? "scale-100" : "scale-0"}>
|
|
24
|
-
|
|
26
|
+
{props.logoText}
|
|
25
27
|
</div>
|
|
26
28
|
</div>
|
|
27
29
|
{props.drawerItems.map((dItem, i) => (
|
|
@@ -31,7 +33,7 @@ export const HawaAppLayout: React.FunctionComponent<HawaAppLayoutTypes> = (
|
|
|
31
33
|
className={clsx(
|
|
32
34
|
"m-1 flex cursor-pointer flex-row items-center overflow-x-clip rounded-lg p-2 pl-3 transition-all hover:bg-primary-400",
|
|
33
35
|
props.currentPage === dItem.slug
|
|
34
|
-
? "bg-primary-600 text-white"
|
|
36
|
+
? "bg-primary-600 text-white hover:bg-primary-600"
|
|
35
37
|
: ""
|
|
36
38
|
)}
|
|
37
39
|
>
|
|
@@ -48,7 +50,7 @@ export const HawaAppLayout: React.FunctionComponent<HawaAppLayoutTypes> = (
|
|
|
48
50
|
))}
|
|
49
51
|
</div>
|
|
50
52
|
|
|
51
|
-
<div className="w-full
|
|
53
|
+
<div className="w-full">{props.children}</div>
|
|
52
54
|
</div>
|
|
53
55
|
)
|
|
54
56
|
}
|