Skip to content

Commit 872b179

Browse files
committed
1.0.2
1 parent eba4f0d commit 872b179

38 files changed

+16431
-36084
lines changed

.eslintrc.json

-40
This file was deleted.

.gitignore

+5-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
1-
/node_modules
1+
node_modules
2+
/lib
3+
/cjs
4+
/dist
5+
/esm

.prettierignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.md

.prettierrc

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"arrowParens": "avoid",
3+
"bracketSpacing": true,
4+
"endOfLine": "auto",
5+
"htmlWhitespaceSensitivity": "css",
6+
"insertPragma": false,
7+
"jsxBracketSameLine": false,
8+
"jsxSingleQuote": false,
9+
"printWidth": 100,
10+
"proseWrap": "preserve",
11+
"quoteProps": "as-needed",
12+
"requirePragma": false,
13+
"semi": true,
14+
"singleQuote": false,
15+
"tabWidth": 4,
16+
"trailingComma": "es5",
17+
"useTabs": true
18+
}

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2018 react-widget
3+
Copyright (c) 2020 nobo react-widget-modal
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

+59-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,59 @@
1-
# react-widget-layout
1+
# react-widget-layout
2+
3+
## 安装
4+
5+
```
6+
npm install --save react-widget-layout
7+
```
8+
9+
## 使用
10+
11+
[![Edit react-widget-layout](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/elegant-sutherland-3lthx?fontsize=14&hidenavigation=1&theme=dark)
12+
13+
```js
14+
import {Layout, Header, Content, Footer} from 'react-widget-layout';
15+
import 'react-widget-layout/style'
16+
17+
export default () => {
18+
return (
19+
<Layout>
20+
<Header>Header</Header>
21+
<Content>Content</Content>
22+
<Footer>Footer</Footer>
23+
</Layout>
24+
);
25+
}
26+
```
27+
28+
## Interface
29+
30+
```ts
31+
interface LayoutProps extends React.HTMLAttributes<HTMLDivElement> {
32+
/** 默认为:rw-layout */
33+
prefixCls?: string;
34+
}
35+
```
36+
37+
## 基本样式
38+
39+
```css
40+
.rw-layout {
41+
display: flex;
42+
flex-direction: column;
43+
flex: auto;
44+
}
45+
.rw-layout-has-sider {
46+
flex-direction: row;
47+
}
48+
49+
.rw-layout-sider,
50+
.rw-layout-header,
51+
.rw-layout-footer {
52+
flex: 0 0 auto;
53+
}
54+
55+
.rw-layout-content {
56+
flex: auto;
57+
}
58+
59+
```

babel.config.js

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
module.exports = api => {
2+
const isTest = api.env("test");
3+
if (!isTest) return {};
4+
5+
return {
6+
presets: [
7+
[
8+
"babel-preset-packez",
9+
{
10+
modules: "cjs",
11+
},
12+
],
13+
],
14+
};
15+
};

docs/asset-manifest.json

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"index.css": "static/css/index.29f605ac.chunk.css",
3+
"index.js": "static/js/index.29f605ac.chunk.js",
4+
"runtime-index.js": "static/js/runtime-index.7c9988e7.js",
5+
"static/js/2.cb69c91a.chunk.js": "static/js/2.cb69c91a.chunk.js",
6+
"index.html": "index.html"
7+
}

docs/index.html

+1-61
Original file line numberDiff line numberDiff line change
@@ -1,61 +1 @@
1-
<!DOCTYPE html>
2-
<html style="width:100%; height:100%; overflow: auto;">
3-
4-
<head>
5-
<meta charset="utf-8">
6-
<title>Layout</title>
7-
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1">
8-
<style type="text/css">
9-
.demo {
10-
width: 1100px;
11-
height: 500px;
12-
margin: 50px auto;
13-
background: #FFF;
14-
font-size: 12px;
15-
overflow: auto;
16-
}
17-
18-
.rw-layout-content {
19-
height: 200px;
20-
}
21-
22-
.rw-layout.rw-layout-has-sider {
23-
24-
25-
text-align: center;
26-
background: #3ba0e9;
27-
}
28-
29-
.rw-layout-sider {
30-
31-
width: 200px;
32-
text-align: center;
33-
background: #3ba0e9;
34-
color: #fff;
35-
}
36-
37-
.rw-layout-footer,
38-
.rw-layout-header {
39-
40-
background: #7dbcea;
41-
color: #fff;
42-
height: 64px;
43-
line-height: 64px;
44-
text-align: center;
45-
}
46-
47-
.rw-layout-content {
48-
49-
background: rgba(16, 142, 233, 1);
50-
color: #fff;
51-
text-align: center;
52-
}
53-
</style>
54-
<link href="static\css\index.c9dfe0dd.css" rel="stylesheet"></head>
55-
56-
<body style="background:#F5F5F5">
57-
<div class="demo" id="demo">
58-
</div>
59-
<script src="static\js\vendors.c6cad972.chunk.js"></script><script src="static\js\index.e5e01207.js"></script></body>
60-
61-
</html>
1+
<!doctype html><html style="width:100%;height:100%;overflow:auto"><head><meta charset="utf-8"><title>Layout</title><meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1"><style>.demo{width:1100px;height:500px;margin:50px auto;background:#fff;font-size:12px;overflow:auto}.rw-layout-content{height:200px}.rw-layout.rw-layout-has-sider{text-align:center;background:#3ba0e9}.rw-layout-sider{width:200px;text-align:center;background:#3ba0e9;color:#fff}.rw-layout-footer,.rw-layout-header{background:#7dbcea;color:#fff;height:64px;line-height:64px;text-align:center}.rw-layout-content{background:#108ee9;color:#fff;text-align:center}</style><link href="static/css/index.29f605ac.chunk.css" rel="stylesheet"></head><body style="background:#f5f5f5"><div class="demo" id="demo"></div><script src="static/js/runtime-index.7c9988e7.js"></script><script src="static/js/2.cb69c91a.chunk.js"></script><script src="static/js/index.29f605ac.chunk.js"></script></body></html>

docs/static/css/index.29f605ac.chunk.css

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)