Commit 224cad7 1 parent 0b840ea commit 224cad7 Copy full SHA for 224cad7
File tree 2 files changed +27
-28
lines changed
2 files changed +27
-28
lines changed Original file line number Diff line number Diff line change 1
1
import { Image , Popover } from '@kobalte/core'
2
- import { Link /* , useLocation */ } from '@solidjs/router'
3
2
import { createSignal , createEffect , Show , onMount } from 'solid-js'
4
3
5
4
export interface ICustomPopover {
6
5
icon : string
7
6
id : string
8
- path : string
9
7
popoverContent ?: string
10
8
disablePopover ?: boolean
11
9
onClick ?: ( ) => void
@@ -42,19 +40,17 @@ export const CustomPopover = (props: ICustomPopover) => {
42
40
return (
43
41
< div class = "group relative inline-flex" onClick = { ( ) => props . onClick ?.( ) } >
44
42
< Popover . Root isOpen = { open ( ) } >
45
- < Link href = { props . path } id = { props . id } class = "no-underline" >
46
- < Popover . Trigger class = "rounded-[8px] pl-[1.5rem] pr-[1.5rem] focus:bg-[#252536] hover:bg-[#252536] outline-none" >
47
- < Image . Root >
48
- < Image . Img
49
- src = { props . icon }
50
- alt = "logo"
51
- width = "20px"
52
- height = "35px"
53
- class = "pt-1 pb-1"
54
- />
55
- </ Image . Root >
56
- </ Popover . Trigger >
57
- </ Link >
43
+ < Popover . Trigger class = "rounded-[8px] pl-[1.5rem] pr-[1.5rem] focus:bg-[#252536] hover:bg-[#252536]" >
44
+ < Image . Root >
45
+ < Image . Img
46
+ src = { props . icon }
47
+ alt = "logo"
48
+ width = "20px"
49
+ height = "35px"
50
+ class = "pt-1 pb-1"
51
+ />
52
+ </ Image . Root >
53
+ </ Popover . Trigger >
58
54
< Show when = { ! props . disablePopover } >
59
55
< Popover . Portal >
60
56
< Popover . Content class = "popover__content" >
Original file line number Diff line number Diff line change
1
+ import { Link } from '@solidjs/router'
1
2
import { CustomPopover } from './CustomPopover'
2
3
import { Logo } from './Logo'
3
- import icons from '@assets/images/index '
4
+ import icons from '@assets/images'
4
5
import './styles.css'
5
6
6
7
interface Iprops {
@@ -17,18 +18,20 @@ export default function Header(props: Iprops) {
17
18
< div class = "flex h-[55%] content-center mt-[5px]" >
18
19
< div class = "flex grow justify-center border-none shadow-lg items-center content-center leading-5 font-sans font-medium text-[.75rem] rounded-[15px] h-[100%] w-[100%] bg-[#0e0e0e] text-[#5f5f5f]" >
19
20
< div class = "flex grow content-center justify-between h-[100%] leading-5 font-sans font-medium rounded-[14px] pl-[5px] pr-[5px] pt-[5px] bg-[#0e0e0e] w-[145px]" >
20
- < CustomPopover
21
- id = "tracker-manager-popover"
22
- icon = { icons . cameraSolid }
23
- path = "/"
24
- popoverContent = "Tracker manager"
25
- />
26
- < CustomPopover
27
- id = "settings-popover"
28
- path = "/settings"
29
- icon = { icons . gearSolid }
30
- popoverContent = "Settings"
31
- />
21
+ < Link href = "/" id = "tracker-manager-popover" class = "no-underline" >
22
+ < CustomPopover
23
+ id = "tracker-manager-popover"
24
+ icon = { icons . cameraSolid }
25
+ popoverContent = "Tracker manager"
26
+ />
27
+ </ Link >
28
+ < Link href = "/settings" id = "settings-popover" class = "no-underline" >
29
+ < CustomPopover
30
+ id = "settings-popover"
31
+ icon = { icons . gearSolid }
32
+ popoverContent = "Settings"
33
+ />
34
+ </ Link >
32
35
</ div >
33
36
</ div >
34
37
</ div >
You can’t perform that action at this time.
0 commit comments