File tree 2 files changed +17
-6
lines changed
components/dashboard/src/components
2 files changed +17
-6
lines changed Original file line number Diff line number Diff line change 4
4
* See License-AGPL.txt in the project root for license information.
5
5
*/
6
6
7
- function Arrow ( props : { up : boolean } ) {
7
+ function Arrow ( props : { up : boolean ; customBorderClasses ?: string } ) {
8
8
return (
9
9
< span
10
- className = "mx-2 border-gray-400 dark:border-gray-600 group-hover:border-gray-600 dark:group-hover:border-gray-400"
10
+ className = {
11
+ "mx-2 " +
12
+ ( props . customBorderClasses ||
13
+ "border-gray-400 dark:border-gray-600 group-hover:border-gray-600 dark:group-hover:border-gray-400" )
14
+ }
11
15
style = { {
12
16
marginTop : 2 ,
13
17
marginBottom : 2 ,
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ import ContextMenu from "./ContextMenu";
11
11
export interface DropDownProps {
12
12
prefix ?: string ;
13
13
customClasses ?: string ;
14
+ renderAsLink ?: boolean ;
14
15
activeEntry ?: string ;
15
16
entries : DropDownEntry [ ] ;
16
17
}
@@ -35,14 +36,20 @@ function DropDown(props: DropDownProps) {
35
36
} ,
36
37
} ;
37
38
} ) ;
38
- const font =
39
- "text-gray-400 dark:text-gray-500 text-sm leading-1 group hover:text-gray-600 dark:hover:text-gray-400 transition ease-in-out" ;
39
+ const defaultFont = "text-gray-400 dark:text-gray-500 hover:text-gray-600 dark:hover:text-gray-400 " ;
40
+ const asLinkFont = "text-blue-500 dark:text-blue-400 hover:text-blue-600 dark:hover:text-blue-500" ;
41
+ const asLinkArrowBorder =
42
+ "border-blue-500 dark:border-blue-400 group-hover:border-blue-600 dark:group-hover:border-blue-500" ;
40
43
return (
41
44
< ContextMenu menuEntries = { enhancedEntries } customClasses = { `${ props . customClasses } right-0` } >
42
- < span className = { `py-2 cursor-pointer ${ font } ` } >
45
+ < span
46
+ className = { `py-2 cursor-pointer text-sm leading-1 group ${
47
+ props . renderAsLink ? asLinkFont : defaultFont
48
+ } transition ease-in-out`}
49
+ >
43
50
{ props . prefix }
44
51
{ current }
45
- < Arrow up = { false } />
52
+ < Arrow up = { false } customBorderClasses = { props . renderAsLink ? asLinkArrowBorder : undefined } />
46
53
</ span >
47
54
</ ContextMenu >
48
55
) ;
You can’t perform that action at this time.
0 commit comments