chore: upgrade ariakit

This commit is contained in:
Aman Harwara
2023-05-16 16:19:22 +05:30
parent 0c4d44fb00
commit 3b23312b62
12 changed files with 91 additions and 114 deletions

View File

@@ -90,22 +90,24 @@ const Appearance: FunctionComponent<Props> = ({ application }) => {
setUseDeviceSettings(!useDeviceSettings)
}
const changeAutoLightTheme = (value: string, item: DropdownItem) => {
if (item.icon === PremiumFeatureIconName) {
const changeAutoLightTheme = (value: string) => {
const item = themeItems.find((item) => item.value === value)
if (item && item.icon === PremiumFeatureIconName) {
premiumModal.activate(`${item.label} theme`)
} else {
application.setPreference(PrefKey.AutoLightThemeIdentifier, value as FeatureIdentifier).catch(console.error)
setAutoLightTheme(value)
return
}
application.setPreference(PrefKey.AutoLightThemeIdentifier, value as FeatureIdentifier).catch(console.error)
setAutoLightTheme(value)
}
const changeAutoDarkTheme = (value: string, item: DropdownItem) => {
if (item.icon === PremiumFeatureIconName) {
const changeAutoDarkTheme = (value: string) => {
const item = themeItems.find((item) => item.value === value)
if (item && item.icon === PremiumFeatureIconName) {
premiumModal.activate(`${item.label} theme`)
} else {
application.setPreference(PrefKey.AutoDarkThemeIdentifier, value as FeatureIdentifier).catch(console.error)
setAutoDarkTheme(value)
return
}
application.setPreference(PrefKey.AutoDarkThemeIdentifier, value as FeatureIdentifier).catch(console.error)
setAutoDarkTheme(value)
}
return (