mirror of
https://github.com/maputnik/editor.git
synced 2025-12-06 06:10:00 +00:00
Keeps the repo clean, same as several other of our repos --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
19 lines
452 B
TypeScript
19 lines
452 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} />
|
|
}
|
|
}
|