This commit is contained in:
Nathan Bierema 2021-06-14 10:08:47 -04:00
parent a75092de67
commit 8534416518
2 changed files with 4 additions and 4 deletions

View File

@ -157,7 +157,7 @@ const getStylingByKeys = (
.map((key) => mergedStyling[key as string])
.filter(Boolean);
const props = styles.reduce(
const props = styles.reduce<Styling>(
(obj, s) => {
if (typeof s === 'string') {
obj.className = [obj.className, s].filter(Boolean).join(' ');
@ -176,7 +176,7 @@ const getStylingByKeys = (
delete props.className;
}
if (Object.keys(props.style).length === 0) {
if (Object.keys(props.style!).length === 0) {
delete props.style;
}

View File

@ -2,8 +2,8 @@ import { Base16Theme } from 'base16';
import * as CSS from 'csstype';
export interface Styling {
className: string;
style: CSS.Properties<string | number>;
className?: string;
style?: CSS.Properties<string | number>;
}
export type StylingValueFunction = (