0.0.1 ā€¢ Published 5 months ago

capacitor-theme-detection v0.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
5 months ago

capacitor-theme-detection

šŸ“± Capacitor plugin to detect whether dark mode is enabled

Install

npm install capacitor-theme-detection
npx cap sync

API

isDarkModeActive()

isDarkModeActive() => any

Returns: any


addListener('themeModeChange', ...)

addListener(eventName: 'themeModeChange', listenerFunc: (params: { mode: ThemeMode; }) => void) => Promise<PluginListenerHandle> & PluginListenerHandle
ParamType
eventName'themeModeChange'
listenerFunc(params: { mode: ThemeMode; }) => void

Returns: any


removeAllListeners()

removeAllListeners() => any

Returns: any


Interfaces

PluginListenerHandle

PropType
remove() => any

Type Aliases

ThemeMode

'Dark' | 'Light'

Thanks

0.0.1

5 months ago