deerhorn-elem
v0.1.7
Published
deerhorn elem
Downloads
6
Readme
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