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.
17 lines
338 B
17 lines
338 B
import {ThemeContext} from './theme-context';
|
|
|
|
function ThemedButton(props) {
|
|
// highlight-range{2-9}
|
|
return (
|
|
<ThemeContext.Consumer>
|
|
{theme => (
|
|
<button
|
|
{...props}
|
|
style={{backgroundColor: theme.background}}
|
|
/>
|
|
)}
|
|
</ThemeContext.Consumer>
|
|
);
|
|
}
|
|
|
|
export default ThemedButton;
|
|
|