https://github.com/pansyjs/react-fullscreen
react fullscreen component
https://github.com/pansyjs/react-fullscreen
alitajs component fullscreen pansy react
Last synced: 6 months ago
JSON representation
react fullscreen component
- Host: GitHub
- URL: https://github.com/pansyjs/react-fullscreen
- Owner: pansyjs
- Created: 2020-01-03T12:35:08.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-02-22T07:56:46.000Z (over 1 year ago)
- Last Synced: 2024-11-09T18:44:54.440Z (7 months ago)
- Topics: alitajs, component, fullscreen, pansy, react
- Language: TypeScript
- Homepage: https://react-fullscreen.now.sh
- Size: 1.12 MB
- Stars: 6
- Watchers: 3
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# React Fullscreen(React 全屏组件)
[](https://github.com/alitajs)
[](https://npmjs.org/package@pansy/react-fullscreen)
[](https://npmjs.org/package/@pansy/react-fullscreen)## ✨ 特性
- 🚀 基于 screenfull 封装
- 📦 基于 rollup 进行打包,提供`cjs`、`es`格式
- 💻 使用 TypeScript 构建,提供完整的类型定义文件## 🏗 安装
```
# npm 安装
npm install @pansy/react-fullscreen --save# yarn 安装 推荐
yarn add @pansy/react-fullscreen
```## Props
### enabled
- 数据类型: `boolean`
- 默认值: `false`
- 描述: 是否全屏### target
- 数据类型: `HTMLElement`
- 默认值: 无
- 描述: 需要控制的目标元素## onClose
- 数据类型: `function`
- 默认值: 无
- 描述: 关闭全屏的回调## ⌨️ 本地开发
```
# 克隆项目到本地
[email protected]:pansyjs/react-fullscreen.git# 切换到项目目录
cd ./react-fullscreen# 安装依赖
yarn
```## 🌟 社区互助
| Github Issue | 钉钉群 | 微信群 |
| ------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------- |
| [issues](https://github.com/pansyjs/react-fullscreen/issues) ||
|