You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

19 lines
395 B

import {ThemeContext} from './theme-context';
class ThemedButton extends React.Component {
// highlight-range{3-10}
render() {
return (
<ThemeContext.Consumer>
{theme => (
<button
{...this.props}
style={{backgroundColor: theme.background}}
/>
)}
</ThemeContext.Consumer>
);
}
}
export default ThemedButton;