import { StyleBackgroundRule } from "../../../types/style/StyleBackgroundRule"; export function renderBackground( descriptor: StyleBackgroundRule ) { let content = []; if( descriptor.color ) { content.push( `background-color: ${descriptor.color};` ); } if( descriptor.url ) { content.push( `background-image: url('${descriptor.url}');` ); } return content.join('\n'); }