7-segment-display 中文文档教程
Seven Segment Display
七段显示的最小反应组件。
Installation
npm
npm install 7-segment-display --save
纱
yarn add 7-segment-display
示例
import React from 'react';
import SevenSegmentDisplay from "7-segment-display"
function App() {
return (
<div className="App">
<SevenSegmentDisplay character={3}></SevenSegmentDisplay>
<SevenSegmentDisplay ledColorOn={"green"} character={7}></SevenSegmentDisplay>
<SevenSegmentDisplay ledBorder={"transparent"} ledColorOn={"black"} ledColorOff={"black"} character={3}></SevenSegmentDisplay>
</div>
);
}
export default App;
注意事项
该组件只能显示一位数字(0 ~ 9)。 其他任何内容都会显示无效指示符(G 段)。 待办事项:多位数组件
谢谢 :D
Seven Segment Display
A minimal react component for seven segment display.
Installation
npm
npm install 7-segment-display --save
yarn
yarn add 7-segment-display
Example
import React from 'react';
import SevenSegmentDisplay from "7-segment-display"
function App() {
return (
<div className="App">
<SevenSegmentDisplay character={3}></SevenSegmentDisplay>
<SevenSegmentDisplay ledColorOn={"green"} character={7}></SevenSegmentDisplay>
<SevenSegmentDisplay ledBorder={"transparent"} ledColorOn={"black"} ledColorOff={"black"} character={3}></SevenSegmentDisplay>
</div>
);
}
export default App;
Notes
The component can only display 1 digit number (0 ~ 9). Anything else will display an invalid indicator ( G segment ). To-Do: A multiple digits component
Thanks :D