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.
18 lines
381 B
18 lines
381 B
import {ThemeContext} from './theme-context';
|
|
|
|
class ThemedButton extends React.Component {
|
|
// highlight-range{3,12}
|
|
render() {
|
|
let props = this.props;
|
|
let theme = this.context;
|
|
return (
|
|
<button
|
|
{...props}
|
|
style={{backgroundColor: theme.background}}
|
|
/>
|
|
);
|
|
}
|
|
}
|
|
ThemedButton.contextType = ThemeContext;
|
|
|
|
export default ThemedButton;
|
|
|