diff --git a/.bitmap b/.bitmap
index 3ab6e70..7b43e11 100644
--- a/.bitmap
+++ b/.bitmap
@@ -1,27 +1,27 @@
/* THIS IS A BIT-AUTO-GENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. */
{
- "guya-ltd.gcss/atoms/button@0.0.1": {
+ "guya-ltd.gcss/atoms/button@0.0.7": {
"files": [
{
+ "name": "Button.js",
"relativePath": "src/components/atoms/Button/Button.js",
- "test": false,
- "name": "Button.js"
+ "test": false
},
{
+ "name": "ButtonLink.js",
"relativePath": "src/components/atoms/Button/_Link/ButtonLink.js",
- "test": false,
- "name": "ButtonLink.js"
+ "test": false
},
{
+ "name": "ButtonIcon.js",
"relativePath": "src/components/atoms/Button/__Icon/ButtonIcon.js",
- "test": false,
- "name": "ButtonIcon.js"
+ "test": false
},
{
+ "name": "index.js",
"relativePath": "src/components/atoms/Button/index.js",
- "test": false,
- "name": "index.js"
+ "test": false
}
],
"mainFile": "src/components/atoms/Button/index.js",
diff --git a/src/components/atoms/Button/Button.js b/src/components/atoms/Button/Button.js
index 42b7aba..55640ee 100644
--- a/src/components/atoms/Button/Button.js
+++ b/src/components/atoms/Button/Button.js
@@ -1,6 +1,7 @@
import React, { Component } from 'react';
import PropTypes from 'prop-types';
-import { withNaming } from '@bem-react/classname'
+import { withNaming } from '@bem-react/classname';
+import { classnames } from '@bem-react/classnames';
import ButtonLink from './_Link/ButtonLink';
import ButtonIcon from './__Icon/ButtonIcon';
@@ -24,7 +25,7 @@ import ButtonIcon from './__Icon/ButtonIcon';
class Button extends Component {
render() {
/* Props */
- const {bsPrefix, children, size, type, href, icon} = this.props;
+ const {bsPrefix, children, size, type, href, icon, theme, variant, block, onClick} = this.props;
/* Class name generator */
const cn = withNaming({ e: '__', m: '', v: '--' })
@@ -32,11 +33,25 @@ class Button extends Component {
/* Set base classname */
let classname = cn(bsPrefix)
+ /* Theme name */
+ const themeName = theme ? 'theme-' + theme : null
+
+ /* Block name */
+ const blockName = block ? 'block' : null;
+
+ /* Classnames */
+ const classnametext = classnames(
+ classname({'': size}),
+ classname({'': variant}),
+ classname({'': blockName}),
+ themeName
+ );
+
if(href && type === 'link')
- return
+ return
else
return (
-