mirror of
https://github.com/reduxjs/redux-devtools.git
synced 2025-02-07 23:20:46 +03:00
158ba2ce12
* Setup Emotion * Fix setup * Start conversion * actionList * actionListHeader * actionListRows * actionListHeaderSelector * actionListItem * actionListItemTime * actionListItemSelector * actionListItemName * actionListHeaderSearch * actionListHeaderWrapper * actionPreview * Remaining css * Format * Propagate Emotion dependencies * Fix tests * Remove styling prop * Remove jss * Remove themeState * Use color map as Emotion theme * Rework theme resolution * Inline CSS * Remove usage of className * Fix warning * Create large-spoons-yell.md
35 lines
906 B
TypeScript
35 lines
906 B
TypeScript
import React from 'react';
|
|
import { JSONTree } from 'react-json-tree';
|
|
import { Action } from 'redux';
|
|
import getItemString from './getItemString';
|
|
import getJsonTreeTheme from './getJsonTreeTheme';
|
|
import { TabComponentProps } from '../ActionPreview';
|
|
|
|
const StateTab: React.FunctionComponent<
|
|
TabComponentProps<any, Action<string>>
|
|
> = ({
|
|
nextState,
|
|
base16Theme,
|
|
invertTheme,
|
|
labelRenderer,
|
|
dataTypeKey,
|
|
isWideLayout,
|
|
sortStateTreeAlphabetically,
|
|
disableStateTreeCollection,
|
|
}) => (
|
|
<JSONTree
|
|
labelRenderer={labelRenderer}
|
|
theme={getJsonTreeTheme(base16Theme)}
|
|
data={nextState}
|
|
getItemString={(type, data) =>
|
|
getItemString(type, data, dataTypeKey, isWideLayout)
|
|
}
|
|
invertTheme={invertTheme}
|
|
hideRoot
|
|
sortObjectKeys={sortStateTreeAlphabetically}
|
|
{...(disableStateTreeCollection ? { collectionLimit: 0 } : {})}
|
|
/>
|
|
);
|
|
|
|
export default StateTab;
|