react-media-hook:React挂钩的媒体查询

时间:2021-04-28 19:23:10
【文件属性】:
文件名称:react-media-hook:React挂钩的媒体查询
文件大小:135KB
文件格式:ZIP
更新时间:2021-04-28 19:23:10
react hook hacktoberfest JavaScript React媒体挂钩 对媒体查询做出React。 使用 API。 安装 用纱安装: yarn add react-media-hook 或使用npm: npm i react-media-hook --save 用法 将查询传递给useMediaPredicate : import React from "react" ; import { useMediaPredicate } from "react-media-hook" ; const Component = ( ) => { const biggerThan400 = useMediaPredicate ( "(min-width: 400px)" ) ; return < div> { biggerThan400 && < button > SomeButton < / butt
【文件预览】:
react-media-hook-master
----.flowconfig(112B)
----yarn.lock(330KB)
----.babelrc(62B)
----.circleci()
--------config.yml(3KB)
----.npmignore(257B)
----index.js.flow(211B)
----example()
--------index.html(188B)
--------index.js(452B)
----tsconfig.json(471B)
----LICENSE(1KB)
----README.md(1KB)
----index.d.ts(238B)
----CODE_OF_CONDUCT.md(3KB)
----.gitignore(69B)
----index.js(1KB)
----.eslintignore(62B)
----package.json(2KB)

网友评论