1.0.36 • Published 7 years ago

react-metal v1.0.36

Weekly downloads
-
License
MIT
Repository
-
Last release
7 years ago

React Metal

React Metal 提供了 Table 等常用的 React 组件。

Example: 图书表格

BooksTableLayout.js

import React from 'react'
import {Layout, Header, Entry, Row, Text} from 'react-metal'

export const BooksTableLayout = () => (
  <Layout>
    <Header>
      <Row>
        <Text value="标题"/>
        <Text value="作者"/>
        <Text value="ISBN"/>
        <Text value="价格"/>
      </Row>
    </Header>
    <Entry>
      <Row>
        <Text key="title"/>
        <Text key="author"/>
        <Text key="isbn"/>
        <Text key="price"/>
      </Row>
    </Entry>
  </Layout>
)

export default BooksTableLayout

Example.js

import React from 'react'
import BooksTableLayout from './BooksTableLayout'
import {Table} from 'react-metal'

const books = [
  {
    title: "平凡的世界",
    author: "路遥"
    isbn: "9787020049295",
    price: 64
  }, {
    title: "围城",
    author: "钱锺书",
    isbn: "9787020024759",
    price: 19
  }, {
    title: "简爱",
    author: "夏洛蒂·勃朗特",
    isbn: "9787506261579",
    price: 18
  }, {
    title: "傲慢与偏见",
    author: "奥斯丁",
    isbn: "9787020040179",
    price: 13
  }
]

export const Example = (props) => (
  <div>
    <Table data={books} layout={BooksTableLayout}/>
  </div>
)
1.0.36

7 years ago

1.0.35

7 years ago

1.0.34

7 years ago

1.0.33

8 years ago

1.0.32

8 years ago

1.0.31

8 years ago

1.0.30

8 years ago

1.0.29

8 years ago

1.0.28

8 years ago

1.0.27

8 years ago

1.0.26

8 years ago

1.0.25

8 years ago

1.0.24

8 years ago

1.0.23

8 years ago

1.0.22

8 years ago

1.0.21

8 years ago

1.0.20

8 years ago

1.0.19

8 years ago

1.0.18

8 years ago

1.0.16

8 years ago

1.0.15

8 years ago

1.0.14

8 years ago

1.0.13

8 years ago

1.0.12

8 years ago

1.0.11

8 years ago

1.0.10

8 years ago

1.0.9

8 years ago

1.0.8

8 years ago

1.0.7

8 years ago

1.0.6

8 years ago

1.0.5

8 years ago

1.0.4

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago