From 57f77e5aa313bf321657db8f8eca2dc4c09b1e7e Mon Sep 17 00:00:00 2001 From: Brent Jackson Date: Sun, 5 Aug 2018 10:35:36 -0400 Subject: [PATCH] Adjust counter example styles --- docs/Counter.js | 34 ++++++++++++++++++++++++++-------- 1 file changed, 26 insertions(+), 8 deletions(-) diff --git a/docs/Counter.js b/docs/Counter.js index f24f2a3..e7a17b1 100644 --- a/docs/Counter.js +++ b/docs/Counter.js @@ -2,15 +2,34 @@ import React from 'react' import styled from 'styled-components' import { space, color } from 'styled-system' +const Root = styled.div([], { + display: 'flex', + alignItems: 'center' +}) + const Button = styled.button([], { appearance: 'none', fontFamily: 'inherit', - fontSize: '12px', + fontSize: 'inherit', fontWeight: 'bold', borderRadius: '4px', border: 'none', - margin: '10px' + width: '2em', + '&:focus': { + outline: 'none', + boxShadow: '0 0 0 2px magenta' + } }, space, color) +Button.defaultProps = { + m: 0, + px: 3, + py: 2, + color: 'background', + bg: 'text' +} + +const Samp = styled.samp([], { +}, space) export default class Counter extends React.Component { @@ -28,12 +47,11 @@ export default class Counter extends React.Component { render() { return ( -
- {this.state.count} -
- - -
+ + + {this.state.count} + + ) } }