mirror of
https://github.com/maputnik/editor.git
synced 2026-02-09 22:20:03 +00:00
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...
20 lines
453 B
TypeScript
20 lines
453 B
TypeScript
import React from 'react'
|
|
import {MdArrowDropDown, MdArrowDropUp} from 'react-icons/md'
|
|
|
|
type CollapserProps = {
|
|
isCollapsed: boolean
|
|
style?: object
|
|
};
|
|
|
|
export default class Collapser extends React.Component<CollapserProps> {
|
|
render() {
|
|
const iconStyle = {
|
|
width: 20,
|
|
height: 20,
|
|
...this.props.style,
|
|
}
|
|
return this.props.isCollapsed ? <MdArrowDropUp style={iconStyle}/> : <MdArrowDropDown style={iconStyle} />
|
|
}
|
|
}
|
|
|