mirror of
https://github.com/reduxjs/redux-devtools.git
synced 2025-07-27 00:19:55 +03:00
Fix
This commit is contained in:
parent
14725700a8
commit
8b9b4d905b
|
@ -157,7 +157,7 @@ const getStylingByKeys = (
|
||||||
.map((key) => mergedStyling[key as string])
|
.map((key) => mergedStyling[key as string])
|
||||||
.filter(Boolean);
|
.filter(Boolean);
|
||||||
|
|
||||||
const props = styles.reduce(
|
const props = styles.reduce<Styling>(
|
||||||
(obj, s) => {
|
(obj, s) => {
|
||||||
if (typeof s === 'string') {
|
if (typeof s === 'string') {
|
||||||
obj.className = [obj.className, s].filter(Boolean).join(' ');
|
obj.className = [obj.className, s].filter(Boolean).join(' ');
|
||||||
|
@ -176,7 +176,7 @@ const getStylingByKeys = (
|
||||||
delete props.className;
|
delete props.className;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Object.keys(props.style).length === 0) {
|
if (Object.keys(props.style!).length === 0) {
|
||||||
delete props.style;
|
delete props.style;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2,8 +2,8 @@ import { Base16Theme } from 'base16';
|
||||||
import * as CSS from 'csstype';
|
import * as CSS from 'csstype';
|
||||||
|
|
||||||
export interface Styling {
|
export interface Styling {
|
||||||
className: string;
|
className?: string;
|
||||||
style: CSS.Properties<string | number>;
|
style?: CSS.Properties<string | number>;
|
||||||
}
|
}
|
||||||
|
|
||||||
export type StylingValueFunction = (
|
export type StylingValueFunction = (
|
||||||
|
|
Loading…
Reference in New Issue
Block a user