feat(measurement): Add support measurement label autocompletion (#3855)
This commit is contained in:
1 parent
807afb8ce5
commit
56b1eae635
25 files changed
+830
-138
No files matched your search
@@ -0,0 +1,41 @@
|
||||
import { Component } from 'react';
|
||||
import React from 'react';
|
||||
|
||||
interface PropsType {
|
||||
value: string;
|
||||
label: string;
|
||||
itemData: { label: string; value: string };
|
||||
id: string;
|
||||
onSelected: Function;
|
||||
index: number;
|
||||
selectTree: any;
|
||||
}
|
||||
|
||||
export default class InputRadio extends Component<PropsType> {
|
||||
render() {
|
||||
const { focusedIndex } = this.props.selectTree.state;
|
||||
const isFocused = this.props.index === focusedIndex;
|
||||
|
||||
return (
|
||||
<label
|
||||
className={`block h-10 w-full cursor-pointer overflow-hidden border-b border-b-gray-900 pl-3 leading-10 ${
|
||||
isFocused ? 'bg-black' : ''
|
||||
}`}
|
||||
htmlFor={this.props.id}
|
||||
>
|
||||
<input
|
||||
type="radio"
|
||||
id={this.props.id}
|
||||
className="hidden"
|
||||
value={this.props.value}
|
||||
onChange={this.onSelected}
|
||||
/>
|
||||
<span className="font-labels">{this.props.label}</span>
|
||||
</label>
|
||||
);
|
||||
}
|
||||
|
||||
onSelected = evt => {
|
||||
this.props.onSelected(evt, this.props.itemData);
|
||||
};
|
||||
}
|
||||
Reference in new issue
Block a user