File tree Expand file tree Collapse file tree 3 files changed +43
-10
lines changed Expand file tree Collapse file tree 3 files changed +43
-10
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " webdevhome.github.io-vite" ,
3- "version" : " 2.0.21 " ,
3+ "version" : " 2.0.22 " ,
44 "scripts" : {
55 "dev" : " vite" ,
66 "build" : " tsc && vite build" ,
Original file line number Diff line number Diff line change @@ -78,17 +78,41 @@ export const WebdevHome: FC = () => {
7878 < >
7979 < AppAction
8080 icon = { mdiArrowLeft }
81- active
8281 label = "Back"
82+ highlight
8383 action = { searchMode . handleSearchAction }
8484 />
85+ < AppAction
86+ icon = { themeSwitcher . icon }
87+ active = { false }
88+ label = { themeSwitcher . title }
89+ action = { themeSwitcher . switchTheme }
90+ />
91+ < AppAction
92+ icon = { mdiStickerTextOutline }
93+ active = { toggleDescriptions . showDescriptions }
94+ label = "Descriptions"
95+ action = { toggleDescriptions . toggle }
96+ />
8597 </ >
8698 ) : isCurrentAppMode ( AppMode . customize ) ? (
8799 < >
100+ < AppAction
101+ icon = { themeSwitcher . icon }
102+ active = { false }
103+ label = { themeSwitcher . title }
104+ action = { themeSwitcher . switchTheme }
105+ />
106+ < AppAction
107+ icon = { mdiStickerTextOutline }
108+ active = { toggleDescriptions . showDescriptions }
109+ label = "Descriptions"
110+ action = { toggleDescriptions . toggle }
111+ />
88112 < AppAction
89113 icon = { mdiCheck }
90- active
91- label = "Done"
114+ label = "Save"
115+ highlight
92116 action = { customizeMode . handleCustomizeAction }
93117 />
94118 </ >
Original file line number Diff line number Diff line change @@ -5,13 +5,15 @@ import { MdiIcon } from '../Icon/MdiIcon'
55interface Props {
66 icon : string
77 active ?: boolean
8+ highlight ?: boolean
89 label ?: string
910 action : ( ) => void
1011}
1112
1213export const AppAction : FC < Props > = ( {
1314 icon,
1415 active = false ,
16+ highlight = false ,
1517 label,
1618 action,
1719} ) => {
@@ -23,12 +25,19 @@ export const AppAction: FC<Props> = ({
2325 'rounded-md' ,
2426 'select-none' ,
2527 {
26- 'hover:bg-gray-200 active:bg-gray-300' : ! active ,
27- 'bg-brand-500 hover:bg-brand-600 active:bg-brand-700' : active ,
28- 'dark:hover:bg-gray-600 dark:active:bg-gray-500' : ! active ,
29- 'dark:hover:bg-brand-600 dark:active:bg-brand-700' : active ,
30- 'text-white' : active ,
31- 'text-gray-800 dark:text-gray-100' : ! active ,
28+ 'hover:bg-gray-200 active:bg-gray-300' : ! active && ! highlight ,
29+ 'bg-brand-500 hover:bg-brand-600 active:bg-brand-700' :
30+ active && ! highlight ,
31+ 'bg-black/10 hover:bg-black/20 active:bg-black/30' : highlight ,
32+ 'dark:hover:bg-gray-600 dark:active:bg-gray-500' :
33+ ! active && ! highlight ,
34+ 'dark:hover:bg-brand-600 dark:active:bg-brand-700' :
35+ active && ! highlight ,
36+ 'dark:bg-white/10 dark:hover:bg-white/20 dark:active:bg-white/30' :
37+ highlight ,
38+ 'text-white' : active && ! highlight ,
39+ 'text-gray-800 dark:text-gray-100' : ! active && ! highlight ,
40+ 'text-brand-600 dark:text-brand-400' : highlight ,
3241 } ,
3342 ) }
3443 onClick = { action }
You can’t perform that action at this time.
0 commit comments