mirror of
https://github.com/a-nyx/maputnik-with-pmtiles.git
synced 2024-12-29 07:30:32 +01:00
Switch font input to AutocompleteInput
This commit is contained in:
parent
48f10bcb73
commit
cf80e80025
2 changed files with 3 additions and 6 deletions
|
@ -41,6 +41,7 @@ class AutocompleteInput extends React.Component {
|
||||||
style={{
|
style={{
|
||||||
userSelect: 'none',
|
userSelect: 'none',
|
||||||
color: colors.lowgray,
|
color: colors.lowgray,
|
||||||
|
cursor: 'default',
|
||||||
background: isHighlighted ? colors.midgray : colors.gray,
|
background: isHighlighted ? colors.midgray : colors.gray,
|
||||||
padding: margins[0],
|
padding: margins[0],
|
||||||
fontSize: fontSizes[5],
|
fontSize: fontSizes[5],
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import React from 'react'
|
import React from 'react'
|
||||||
import SelectInput from './SelectInput'
|
import AutocompleteInput from './AutocompleteInput'
|
||||||
import input from '../../config/input.js'
|
import input from '../../config/input.js'
|
||||||
|
|
||||||
//TODO: Query available font stack dynamically
|
//TODO: Query available font stack dynamically
|
||||||
|
@ -24,12 +24,8 @@ class FontInput extends React.Component {
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const inputs = this.values.map((value, i) => {
|
const inputs = this.values.map((value, i) => {
|
||||||
return <SelectInput
|
return <AutocompleteInput
|
||||||
key={i}
|
key={i}
|
||||||
style={{
|
|
||||||
width: '100%',
|
|
||||||
...this.props.style,
|
|
||||||
}}
|
|
||||||
value={value}
|
value={value}
|
||||||
options={fontStacks.map(f => [f, f])}
|
options={fontStacks.map(f => [f, f])}
|
||||||
onChange={this.changeFont.bind(this, i)}
|
onChange={this.changeFont.bind(this, i)}
|
||||||
|
|
Loading…
Reference in a new issue