diff --git a/.bitmap b/.bitmap index 1c1e825..11cd6fa 100644 --- a/.bitmap +++ b/.bitmap @@ -62,17 +62,17 @@ "origin": "AUTHORED", "exported": true }, - "guya-ltd.gcss/atoms/link@0.0.1": { + "guya-ltd.gcss/atoms/link@0.0.6": { "files": [ { + "name": "Link.js", "relativePath": "src/components/atoms/Link/Link.js", - "test": false, - "name": "Link.js" + "test": false }, { + "name": "index.js", "relativePath": "src/components/atoms/Link/index.js", - "test": false, - "name": "index.js" + "test": false } ], "mainFile": "src/components/atoms/Link/index.js", @@ -308,42 +308,42 @@ "origin": "AUTHORED", "exported": true }, - "guya-ltd.gcss/templates/landing/login@0.0.2": { + "guya-ltd.gcss/templates/landing/login@0.0.5": { "files": [ { + "name": "Login.js", "relativePath": "src/components/templates/landing/Login/Login.js", - "test": false, - "name": "Login.js" + "test": false }, { + "name": "LoginBody.js", "relativePath": "src/components/templates/landing/Login/__Body/LoginBody.js", - "test": false, - "name": "LoginBody.js" + "test": false }, { + "name": "LoginFooter.js", "relativePath": "src/components/templates/landing/Login/__Footer/LoginFooter.js", - "test": false, - "name": "LoginFooter.js" + "test": false }, { + "name": "LoginFooterLeft.js", "relativePath": "src/components/templates/landing/Login/__Footer/__Left/LoginFooterLeft.js", - "test": false, - "name": "LoginFooterLeft.js" + "test": false }, { + "name": "LoginFooterRight.js", "relativePath": "src/components/templates/landing/Login/__Footer/__Right/LoginFooterRight.js", - "test": false, - "name": "LoginFooterRight.js" + "test": false }, { + "name": "LoginHeader.js", "relativePath": "src/components/templates/landing/Login/__Header/LoginHeader.js", - "test": false, - "name": "LoginHeader.js" + "test": false }, { + "name": "index.js", "relativePath": "src/components/templates/landing/Login/index.js", - "test": false, - "name": "index.js" + "test": false } ], "mainFile": "src/components/templates/landing/Login/index.js", diff --git a/src/components/atoms/Link/Link.js b/src/components/atoms/Link/Link.js index 78b20b1..54b2c62 100644 --- a/src/components/atoms/Link/Link.js +++ b/src/components/atoms/Link/Link.js @@ -22,7 +22,7 @@ import { classnames } from '@bem-react/classnames' class Link extends Component { render() { /* Props */ - const {bsPrefix, children, href} = this.props; + const {bsPrefix, children, href, size, theme, variant, cls, onClick} = this.props; /* Class name generator */ const cn = withNaming({ e: '__', m: '', v: '--' }) @@ -30,7 +30,17 @@ class Link extends Component { /* Set base classname */ let classname = cn(bsPrefix) - return ( {children}) + /* Theme name */ + const themeName = theme ? 'theme-' + theme : null + + /* Classnames */ + const classnametext = classnames( + classname({'': size}), + classname({'': variant}), + themeName + ); + + return ( {children}) } } @@ -47,11 +57,31 @@ Link.propTypes = { * @default 'Link' */ children: PropTypes.string, + /** + * @description Link. + * @property {string} + * @default '#' + */ + href: PropTypes.string, + /** + * @description Size. + * @enum {('xs'|'sm'|'md'|'lg'|'xl')} + * @default 'md' + */ + size: PropTypes.oneOf(['xs', 'sm', 'md', 'lg', 'xl']), + /** + * @description Theme. + * @enum {('theme-red'|'theme-royal-blue'|'cornflower-blue')} + * @default null + */ + theme: PropTypes.oneOf(['theme-red', 'theme-royal-blue']), } Link.defaultProps = { bsPrefix: 'link', children: 'Link', + href: '#', + size: 'md' } /** diff --git a/src/components/templates/landing/Login/Login.js b/src/components/templates/landing/Login/Login.js index 287da0e..bdac380 100644 --- a/src/components/templates/landing/Login/Login.js +++ b/src/components/templates/landing/Login/Login.js @@ -76,7 +76,7 @@ Login.propTypes = { } Login.defaultProps = { - bsPrefix: 'login', + bsPrefix: 'ad-login', header: null, body: null, footer: null, diff --git a/src/components/templates/landing/Login/__Body/LoginBody.js b/src/components/templates/landing/Login/__Body/LoginBody.js index c3c0ef7..7c5ac96 100644 --- a/src/components/templates/landing/Login/__Body/LoginBody.js +++ b/src/components/templates/landing/Login/__Body/LoginBody.js @@ -16,9 +16,12 @@ import React from 'react'; * @example */ -const LoginBody = ({content}) => { +const LoginBody = ({cn, content}) => { + /* Class names collection */ + const classname = cn('body'); + return ( -