mirror of
https://github.com/maputnik/editor.git
synced 2026-06-15 11:47:26 +00:00
Migration of jsx files to tsx 2 (#850)
This is to continue the work of migrating all the jsx files into tsx files. The MO is basically described here: #848. About 7 files to go...
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
import React from 'react'
|
||||
import Collapser from './Collapser'
|
||||
|
||||
type LayerListGroupProps = {
|
||||
title: string
|
||||
"data-wd-key"?: string
|
||||
isActive: boolean
|
||||
onActiveToggle(...args: unknown[]): unknown
|
||||
'aria-controls'?: string
|
||||
};
|
||||
|
||||
export default class LayerListGroup extends React.Component<LayerListGroupProps> {
|
||||
render() {
|
||||
return <li className="maputnik-layer-list-group">
|
||||
<div className="maputnik-layer-list-group-header"
|
||||
data-wd-key={"layer-list-group:"+this.props["data-wd-key"]}
|
||||
onClick={_e => this.props.onActiveToggle(!this.props.isActive)}
|
||||
>
|
||||
<button
|
||||
className="maputnik-layer-list-group-title"
|
||||
aria-controls={this.props['aria-controls']}
|
||||
aria-expanded={this.props.isActive}
|
||||
>
|
||||
{this.props.title}
|
||||
</button>
|
||||
<span className="maputnik-space" />
|
||||
<Collapser
|
||||
style={{ height: 14, width: 14 }}
|
||||
isCollapsed={this.props.isActive}
|
||||
/>
|
||||
</div>
|
||||
</li>
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user