mirror of
https://github.com/maputnik/editor.git
synced 2026-07-30 01:37:27 +00:00
Switch font input to AutocompleteInput
This commit is contained in:
@@ -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)}
|
||||||
|
|||||||
Reference in New Issue
Block a user