1.0.16 • Published 2 years ago

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

Weekly downloads
1
License
ISC
Repository
github
Last release
2 years 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

2 years ago

1.0.15

2 years ago

1.0.14

5 years ago

1.0.13

5 years ago

1.0.12

5 years ago

1.0.11

5 years ago

1.0.10

5 years ago

1.0.9

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago