Files
editor/src/components/Collapser.tsx
T
2026-07-14 13:50:17 +03:00

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} />;
};