mirror of
https://github.com/maputnik/editor.git
synced 2026-07-15 10:27:25 +00:00
17 lines
409 B
TypeScript
17 lines
409 B
TypeScript
import React from "react";
|
|
import {MdArrowDropDown, MdArrowDropUp} from "react-icons/md";
|
|
|
|
type CollapserProps = {
|
|
isCollapsed: boolean
|
|
style?: object
|
|
};
|
|
|
|
export const Collapser: React.FC<CollapserProps> = (props) => {
|
|
const iconStyle = {
|
|
width: 20,
|
|
height: 20,
|
|
...props.style,
|
|
};
|
|
return props.isCollapsed ? <MdArrowDropUp style={iconStyle}/> : <MdArrowDropDown style={iconStyle} />;
|
|
};
|