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
338 B

7 years ago
import {ThemeContext} from './theme-context';
function ThemedButton(props) {
// highlight-range{2-9}
return (
<ThemeContext.Consumer>
{theme => (
<button
7 years ago
{...props}
style={{backgroundColor: theme.background}}
/>
)}
</ThemeContext.Consumer>
);
}
export default ThemedButton;