How to use the expo-brightness.BrightnessMode.AUTOMATIC function in expo-brightness

To help you get started, we’ve selected a few expo-brightness examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github byCedric / use-expo / example / src / molecules / brightness / use-system-brightness-mode.tsx View on Github external
This example uses both the Permissions and Brightness modules.
				When you grant the SYSTEM_BRIGHTNESS permission, it renders two buttons to switch the system brightness mode.
			
			
				{(permission && permission.status !== 'granted') && (
					
						We need permission to modify the system brightness.
					
				)}
				{(permission && permission.status === 'granted') && (
					<>
						
							<button mode="{mode" color="#333"> setMode(BrightnessMode.AUTOMATIC)}
							&gt;
								Automatic
							</button>
						
						
							<button mode="{mode" color="#333"> setMode(BrightnessMode.MANUAL)}
							&gt;
								Manual
							</button>
						
					
				)}