import React from 'react' ; import { getColorPalette , getLinearGradient } from '../../../color_palettes' ; interface Props { colorPaletteId : string ; } export const ColorGradient = ( { colorPaletteId } ) => { const palette = getColorPalette ( colorPaletteId ) ; return palette . length ? ( < div className = "mapColorGradient" style = { { background : getLinearGradient ( palette ) } } />) : null; } ;