Created custom icons for format/compact
This commit is contained in:
parent
4f86135050
commit
3d2f9ce8df
|
@ -3,13 +3,33 @@ import DropDown from './DropDown'
|
|||
import PropTypes from 'prop-types'
|
||||
|
||||
import fontawesome from '@fortawesome/fontawesome'
|
||||
import faAlignLeft from '@fortawesome/fontawesome-free-solid/faAlignLeft'
|
||||
import faAlignJustify from '@fortawesome/fontawesome-free-solid/faAlignJustify'
|
||||
import faScrewdriver from '@fortawesome/fontawesome-free-solid/faScrewdriver'
|
||||
|
||||
import './Menu.css'
|
||||
|
||||
fontawesome.library.add(faAlignLeft, faAlignJustify, faScrewdriver)
|
||||
const faCompact = {
|
||||
prefix: 'fa',
|
||||
iconName: 'compact',
|
||||
icon: [
|
||||
16, 16,
|
||||
[],
|
||||
null,
|
||||
'm 0,2 0,2 16,0 0,-2 m -16,4 0,2 16,0 0,-2 m -16,4 0,2 9,0 0,-2'
|
||||
]
|
||||
}
|
||||
|
||||
const faFormat = {
|
||||
prefix: 'fa',
|
||||
iconName: 'format',
|
||||
icon: [
|
||||
16, 16,
|
||||
[],
|
||||
null,
|
||||
'm 0,2 0,2 12,0 0,-2 m -6,4 0,2 10,0 0,-2 m -10,4 0,2 9,0 0,-2 m -15,4 0,2 10,0 0,-2'
|
||||
]
|
||||
}
|
||||
|
||||
fontawesome.library.add(faCompact, faFormat, faScrewdriver)
|
||||
|
||||
export default class TreeModeMenu extends PureComponent {
|
||||
|
||||
|
@ -54,13 +74,13 @@ export default class TreeModeMenu extends PureComponent {
|
|||
className: 'jsoneditor-format',
|
||||
title: 'Format the JSON document',
|
||||
onClick: this.props.onFormat
|
||||
}, h('i', {className: 'fa fa-align-left'})),
|
||||
}, h('i', {className: 'fa fa-format'})),
|
||||
h('button', {
|
||||
key: 'compact',
|
||||
className: 'jsoneditor-compact',
|
||||
title: 'Compact the JSON document',
|
||||
onClick: this.props.onCompact
|
||||
}, h('i', {className: 'fa fa-align-justify'})),
|
||||
}, h('i', {className: 'fa fa-compact'})),
|
||||
h('button', {
|
||||
key: 'repair',
|
||||
className: 'jsoneditor-repair',
|
||||
|
|
Loading…
Reference in New Issue