0.1.7 • Published 7 years ago

deerhorn-elem v0.1.7

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

DeerHorn Element

安装方法

yarn add deerhorn-elem

使用方法

import * as React from 'react'
import { Flex, Span, Absolute, Flex } from 'deerhorn-elem' 

export default class TestComponent extends React {
    constructor(props) {
        super(props)
        this.state = { isActive: false }
    }

    render() {
        return (
            <Flex relative onClick={() => this.setState({ isActive: this.state.isActive })}>
                <Layer.Full active={isActive}>
                    <Flex column justify="center">On/Off</Flex>
                </Layer.Full>
                <Absolute rect="48px 48px 48px 48px">
                    <Span fontSize="12px" color="red" scope="this-is-classname">Hello</Span>
                </Absolute>
            </Flex>
        )
    }
}

组件:

  • Flex: 基本布局组件
  • Span: 文本组件
  • Absolute: 绝对定位组件
  • Layer: 分层组件集合
    • Full
    • Block
0.1.7

7 years ago

0.1.6

7 years ago

0.1.5

7 years ago

0.1.4

7 years ago

0.1.3

7 years ago

0.1.2

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago