
Product
Rust Support Now in Beta
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.
ac-thermometer
Advanced tools
温度计、液位计 应用组件
查看更多应用组件前往 https://github.com/tinper-acs
演示效果: https://tinper-acs.github.io/ac-thermometer/
本组件包含温度计Thermometer
、液位计ContentGage
两种组件
npm install ac-thermometer -S
import React, { Component } from 'react';
import { Col, Row } from 'tinper-bee';//加载组件库
import { Thermometer, ContentGage } from 'ac-thermometer';//导入应用组件
import 'tinper-bee/assets/tinper-bee.css';//加载组件库样式
import 'ac-thermometer/dist/index.css';//加载温度计、液位计样式
class Demo extends Component {
constructor() {
super();
this.state = {
num: 0
}
}
componentDidMount = () => {
setInterval(() => {
let num = Math.floor(Math.random() * (100 - 0 + 1) + 0);
this.setState({ num });
}, 3000);
}
render() {
let { num } = this.state;
return (
<div>
<Row style={{ "paddingTop": "30px" }}>
<Col md={2}>
<Thermometer
theme="light"
value={num}
max="100"
steps="5"
format="°C"
size="small"
height="400"
/>
</Col>
<Col md={2}>
<Thermometer
theme="light"
value={num}
max="100"
steps="5"
format="°C"
size="normal"
height="400"
/>
</Col>
<Col md={2}>
<Thermometer
theme="light"
value={num}
max="100"
steps="5"
format="°C"
size="large"
height="400"
/>
</Col>
<Col md={1}>
<ContentGage
theme="light"
value={num}
max="100"
steps="5"
format="L"
size="small"
height="400"
/>
</Col>
<Col md={1}>
<ContentGage
theme="light"
value={num}
max="100"
steps="5"
format="L"
size="normal"
height="400"
/>
</Col>
<Col md={1}>
<ContentGage
theme="light"
value={num}
max="100"
steps="5"
format="L"
size="large"
height="400"
/>
</Col>
</Row>
</div>
);
}
}
export default Demo;
参数 | 类型 | 说明 | 默认值 |
---|---|---|---|
theme | String | Light or Dark | light |
value | Number | 温度值 | 0 |
max | Number | 温度计最大值 | 100 |
steps | Number | 温度计分隔 | 0 |
format | String | 单位格式 | "" |
size | String | 温度计的尺寸.可以是小的(small)、正常(normal)或者大的(large) | normal |
height | Number | 温度计的高度 | 200 |
FAQs
tinper-bee ac thermometer components
The npm package ac-thermometer receives a total of 0 weekly downloads. As such, ac-thermometer popularity was classified as not popular.
We found that ac-thermometer demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 12 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.
Product
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
Security News
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.