dock-panel
TypeScript icon, indicating that this package has built-in type declarations

3.0.0 • Public • Published

DockPanel

image

面向 React 的 Dock 布局组件,类似 .NET Window Forms 中的 Dock 布局模式。

安装

npm i dock-panel --save

使用

import React from "react";
import { DockPanel, DockType } from "dock-panel";
 
function App() {
  return (
    <DockPanel style={{ width: "100%", height: "100%" }}>
      <DockPanel
        dock={DockType.left}
        style={{ background: "red", width: 100 }}
      >
        left
      </DockPanel>
      <DockPanel
        dock={DockType.top}
        style={{ background: "green", height: "20%" }}
      >
        top
      </DockPanel>
      <DockPanel
        dock={DockType.bottom}
        style={{ background: "blue", height: 100 }}
      >
        bottom
      </DockPanel>
      <DockPanel dock={DockType.fill} style={{ background: "black" }}>
        fill
      </DockPanel>
    </DockPanel>
  );
}

/dock-panel/

    Package Sidebar

    Install

    npm i dock-panel

    Weekly Downloads

    7

    Version

    3.0.0

    License

    MIT

    Unpacked Size

    37.3 kB

    Total Files

    27

    Last publish

    Collaborators

    • houzhanfeng