| 1 | import React, { useState, useContext } from "react"; |
| 2 | import styled from "styled-components"; |
| 3 | |
| 4 | import ThemeContext from "./context"; |
| 5 | |
| 6 | function Card(props) { |
| 7 | const theme = useContext(ThemeContext); |
| 8 | return ( |
| 9 | <div {...props} className={`${props.className} ${theme}`}> |
| 10 | {props.children} |
| 11 | </div> |
| 12 | ); |
| 13 | } |
| 14 | |
| 15 | export default styled(Card)` |
| 16 | text-align: left; |
| 17 | padding: 24px; |
| 18 | background: #1d252c; |
| 19 | border-radius: 8px; |
| 20 | `; |