1.0.16 • Published 1 year ago

@lazy-react/prefers-light-mode v1.0.16

Weekly downloads
1
License
ISC
Repository
github
Last release
1 year ago

README.md

detect if the user has requested the system use a light or dark color theme.

install

yarn add @lazy-react/prefers-light-mode
yarn-tool add @lazy-react/prefers-light-mode
yt add @lazy-react/prefers-light-mode
import React, { useState } from 'react'
import App, { Container } from 'next/app';
import PrefersLightMode from '@lazy-react/prefers-light-mode/component';
import CssBaseline from '@material-ui/core/CssBaseline';

export default class MyApp extends App
{
	render()
	{
		const { Component, pageProps } = this.props;
		return (
			<React.StrictMode>
				<PrefersLightMode key="PrefersLightMode">
					<CssBaseline />
					<Component {...pageProps} />
				</PrefersLightMode>
			</React.StrictMode>
		)
	}
}
1.0.16

1 year ago

1.0.15

1 year ago

1.0.14

3 years ago

1.0.13

3 years ago

1.0.12

4 years ago

1.0.11

4 years ago

1.0.10

4 years ago

1.0.9

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago