File tree Expand file tree Collapse file tree
components/dashboard/src/components Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44 * See License-AGPL.txt in the project root for license information.
55 */
66
7- function Arrow ( props : { up : boolean } ) {
7+ function Arrow ( props : { up : boolean ; customBorderClasses ?: string } ) {
88 return (
99 < 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+ }
1115 style = { {
1216 marginTop : 2 ,
1317 marginBottom : 2 ,
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ import ContextMenu from "./ContextMenu";
1111export interface DropDownProps {
1212 prefix ?: string ;
1313 customClasses ?: string ;
14+ renderAsLink ?: boolean ;
1415 activeEntry ?: string ;
1516 entries : DropDownEntry [ ] ;
1617}
@@ -35,14 +36,20 @@ function DropDown(props: DropDownProps) {
3536 } ,
3637 } ;
3738 } ) ;
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" ;
4043 return (
4144 < 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+ >
4350 { props . prefix }
4451 { current }
45- < Arrow up = { false } />
52+ < Arrow up = { false } customBorderClasses = { props . renderAsLink ? asLinkArrowBorder : undefined } />
4653 </ span >
4754 </ ContextMenu >
4855 ) ;
You can’t perform that action at this time.
0 commit comments