mirror of
https://github.com/reduxjs/redux-devtools.git
synced 2024-11-24 18:43:54 +03:00
81926f3212
* Remove UNSAFE method from JSONTree * Bump peer dep * Fix types * Remove proptypes * Remove unused * shouldExpandNode => shouldExpandNodeInitially * Cleanup * Update usages * Tighten types * Create four-parrots-poke.md * Format * Fix inspector-monitor types * Fix log-monitor types * Fix rtk-query-monitor types * Fix type
30 lines
726 B
TypeScript
30 lines
726 B
TypeScript
import React from 'react';
|
|
import type { StylingFunction } from 'react-base16-styling';
|
|
|
|
interface Props {
|
|
styling: StylingFunction;
|
|
arrowStyle?: 'single' | 'double';
|
|
expanded: boolean;
|
|
nodeType: string;
|
|
onClick: React.MouseEventHandler<HTMLDivElement>;
|
|
}
|
|
|
|
export default function JSONArrow({
|
|
styling,
|
|
arrowStyle = 'single',
|
|
expanded,
|
|
nodeType,
|
|
onClick,
|
|
}: Props) {
|
|
return (
|
|
<div {...styling('arrowContainer', arrowStyle)} onClick={onClick}>
|
|
<div {...styling(['arrow', 'arrowSign'], nodeType, expanded, arrowStyle)}>
|
|
{'\u25B6'}
|
|
{arrowStyle === 'double' && (
|
|
<div {...styling(['arrowSign', 'arrowSignInner'])}>{'\u25B6'}</div>
|
|
)}
|
|
</div>
|
|
</div>
|
|
);
|
|
}
|