/
githubmirror
/
next.js
Обзор
Документация
Войти
/
githubmirror
/
next.js
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
canary
examples/with-mobx/components/Clock.js
31 строка
655 B
hrmny
chore: update prettier to 3.2.5 (#65092)
08 май 2024, 22:47
Не верифицирован
08 май 2024, 22:47
64b718c
Код
Авторство
О чём код?
import { observer } from "mobx-react-lite"; import { useStore } from "./StoreProvider"; const Clock = observer(function Clock(props) { // use store from the store context const store = useStore(); return ( <div className={store.light ? "light" : ""}> {store.timeString} <style jsx>{` div { padding: 15px; color: #82fa58; display: inline-block; font: 50px menlo, monaco, monospace; background-color: #000; } .light { background-color: #999; } `}</style> </div> ); }); export default Clock;