pass config object

main
Mike Fix 8 years ago
parent d0c0f18b45
commit d7bf3be820

@ -48,10 +48,12 @@ if (typeof window !== 'undefined' && typeof window.navigator !== 'undefined') {
export const THEMES = [ export const THEMES = [
{ {
name: 'dracula' id: 'dracula',
name: 'Dracula'
}, },
{ {
name: 'solarized' id: 'solarized',
name: 'Solarized'
} }
] ]

@ -73,7 +73,7 @@ class Index extends React.Component {
onBGChange={color => this.setState({ bgColor: color })} onBGChange={color => this.setState({ bgColor: color })}
bg={this.state.bgColor} bg={this.state.bgColor}
/> />
<CodeImage bg={this.state.bgColor}> <CodeImage config={{ bg: this.state.bgColor}}>
{this.props.content || DEFAULT_CODE} {this.props.content || DEFAULT_CODE}
</CodeImage> </CodeImage>
</div> </div>

Loading…
Cancel
Save