From db37669ac68b4071f21b74466decafa610bb2123 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Se=CC=81rgio=20Ramos?= Date: Wed, 26 Oct 2016 11:55:08 +0100 Subject: [PATCH] initial button implementation --- ui/src/components/button/index.js | 12 +++++++++++- ui/src/components/button/readme.md | 28 ++++++++++++++++++++++++++-- ui/src/components/button/style.css | 27 ++++++++++++++++++++++++--- 3 files changed, 61 insertions(+), 6 deletions(-) diff --git a/ui/src/components/button/index.js b/ui/src/components/button/index.js index f00df8e0..31c33597 100644 --- a/ui/src/components/button/index.js +++ b/ui/src/components/button/index.js @@ -1,15 +1,24 @@ +const classNames = require('classnames'); const React = require('react'); const styles = require('./style.css'); const Button = ({ disabled = false, + secundary = false, className, style, children }) => { + const cn = classNames( + className, + styles.button, + secundary ? styles.secundary : styles.primary, + disabled ? styles.inactive : '', + ); + return ( + + + + + + + + + + + + + + + ); ``` @@ -21,7 +45,7 @@ const Button = require('ui/button'); module.exports = () => { return ( - ); diff --git a/ui/src/components/button/style.css b/ui/src/components/button/style.css index 2e38a505..1ccdca91 100644 --- a/ui/src/components/button/style.css +++ b/ui/src/components/button/style.css @@ -1,4 +1,25 @@ .button { - background-color: #e500ee; - margin: none; -} \ No newline at end of file + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; + font-size: 16px; + border-radius: 4px; + box-shadow: 0px 2px 0px 0px rgba(0,0,0,0.05); + + + &.primary { + background: #3B47CC; + border: 1px solid #2532BB; + color: #FFFFFF; + } + + &.secundary { + background: #FFFFFF; + border: 1px solid #D8D8D8; + color: #646464; + } + + &.inactive { + background: #F9F9F9; + border: 1px solid #D8D8D8; + color: #737373; + } +}