blob: c9df0f8343ec212d50855a9ac69ecf3df11a6395 (
plain) (
tree)
|
|
import { ObjectMap } from '@0xproject/types';
import * as _ from 'lodash';
export const cssRuleIfExists = (props: ObjectMap<any>, rule: string): string => {
const camelCaseRule = _.camelCase(rule);
const ruleValueIfExists = props[camelCaseRule];
if (!_.isUndefined(ruleValueIfExists)) {
return `${rule}: ${ruleValueIfExists};`;
}
return '';
};
|