react-cristal

所属分类:系统编程
开发工具:TypeScript
文件大小:0KB
下载次数:0
上传日期:2019-02-19 00:25:51
上 传 者sh-1993
说明:  React的漂亮窗口管理器,
(Beautiful window manager for React,)

文件列表:
.nvmrc (5, 2019-02-18)
.travis.yml (110, 2019-02-18)
LICENSE (1070, 2019-02-18)
__tests__/ (0, 2019-02-18)
__tests__/cristal.spec.tsx (4617, 2019-02-18)
__tests__/getBoundaryCoords.spec.ts (116, 2019-02-18)
__tests__/stacker.spec.ts (620, 2019-02-18)
custom-typings/ (0, 2019-02-18)
custom-typings/atlaskit.d.ts (29, 2019-02-18)
demo.gif (8436294, 2019-02-18)
example/ (0, 2019-02-18)
example/app.tsx (4842, 2019-02-18)
example/index.html (190, 2019-02-18)
example/index.tsx (172, 2019-02-18)
example/styled.ts (578, 2019-02-18)
package.json (1179, 2019-02-18)
src/ (0, 2019-02-18)
src/content.tsx (301, 2019-02-18)
src/cristal.tsx (7093, 2019-02-18)
src/domain.ts (395, 2019-02-18)
src/header.tsx (295, 2019-02-18)
src/index.ts (151, 2019-02-18)
src/stacker.ts (261, 2019-02-18)
src/styled.ts (2236, 2019-02-18)
src/utils.ts (1340, 2019-02-18)
tsconfig.json (612, 2019-02-18)
yarn.lock (291010, 2019-02-18)

# react-cristal > Convert any component into a window
demo

# Demo [https://zzarcon.github.io/react-cristal](https://zzarcon.github.io/react-cristal) # Features * Draggable * Resizable * Automatically stacking * Smart positions * Window boundaries restriction # Install ``` $ yarn add react-cristal ``` # Usage **Basic** ```tsx import Cristal from 'react-cristal'; Look at me, I'm inside a window! ``` **Custom** ```tsx import Cristal from 'react-cristal'; console.log('close clicked')} >
Some content
``` # Using initial position ```tsx // Smart positions // Custom coordinates ``` # Api ```ts export type InitialPosition = 'top-left' | 'top-center' | 'top-right' | 'bottom-left' | 'bottom-center' | 'bottom-right' | 'center'; interface Props { children: ReactNode; title?: string; initialPosition?: InitialPosition; isResizable?: boolean; onClose?: () => void; className?: string; } ``` See [example/](https://github.com/zzarcon/react-cristal/tree/master/example) for full example. # Author [@zzarcon](https://twitter.com/zzarcon)

近期下载者

相关文件


收藏者