/** * Copyright (c) 2018 mol* contributors, licensed under MIT, See LICENSE file for more info. * * @author Alexander Rose */ import * as React from 'react' import { ColorTheme } from '../../mol-theme/color'; import { Color } from '../../mol-util/color'; export interface ColorThemeComponentProps { colorTheme: ColorTheme } export interface ColorThemeComponentState { } export class ColorThemeComponent extends React.Component { state = { } render() { const ct = this.props.colorTheme return
Color Theme Info {ct.description ?
{ct.description}
: ''} { ct.legend && ct.legend.kind === 'scale-legend' ?
Color.toStyle(c)).join(', ')})` }} > {ct.legend.minLabel} {ct.legend.maxLabel}
: ct.legend && ct.legend.kind === 'table-legend' ?
{ct.legend.table.map((value, i) => { const [name, color] = value return
{name}
})}
: '' }
; } }