mirror of
https://github.com/status-im/nimbus-gui.git
synced 2025-01-21 00:40:09 +00:00
feat: add css for custom autocomplete
This commit is contained in:
parent
df9c8cc62c
commit
96ca1230fa
@ -0,0 +1,16 @@
|
||||
.suggestion-list {
|
||||
max-height: 100px;
|
||||
overflow-y: scroll;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 4px;
|
||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
.suggestion-item {
|
||||
padding: 5px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.suggestion-item:hover {
|
||||
background-color: #f1f1f1;
|
||||
}
|
@ -4,6 +4,7 @@ import wordlist from 'web-bip39/wordlists/english'
|
||||
|
||||
import { RootState } from '../../../redux/store'
|
||||
import { setMnemonic, setWord } from '../../../redux/ValidatorOnboarding/KeyGeneration/slice'
|
||||
import './AutocompleteInput.css'
|
||||
|
||||
type AutocompleteInputProps = {
|
||||
index: number
|
||||
@ -50,9 +51,13 @@ const AutocompleteInput = ({ index }: AutocompleteInputProps) => {
|
||||
/>
|
||||
{isFocused && (
|
||||
<div className="suggestion-list">
|
||||
{suggestions.map(s => (
|
||||
<div key={s} className="suggestion-item" onClick={() => handleSuggestionClick(s)}>
|
||||
{s}
|
||||
{suggestions.map(suggestion => (
|
||||
<div
|
||||
key={suggestion}
|
||||
className="suggestion-item"
|
||||
onClick={() => handleSuggestionClick(suggestion)}
|
||||
>
|
||||
{suggestion}
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user