Press n or j to go to the next uncovered block, b, p or k for the previous block.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | 8x 8x 8x 21x 21x 8x 1x 1x | import React from 'react'; import { defaultProps } from './props/defaultProps'; import { propTypes } from './props/propTypes'; import style from './Buttongroup.module.css'; /* eslint css-modules/no-unused-class: [2, { markAsUsed: ['footer','header', 'tab','alignleft','alignright','aligncenter' ] }] */ export default class Buttongroup extends React.Component { render() { let { children, type, buttonPosition, customClass, dataId, dataSelectorId } = this.props; let btnGroup = []; children && children.forEach((child) => { let btnRight = <span className={style[type]}>{child}</span>; btnGroup.push(btnRight); }); return ( <div className={`${style.buttonGroup} ${style[type]} ${customClass ? customClass : ''}`} data-id={dataId} data-test-id={dataId} data-selector-id={dataSelectorId} > <div className={style[`align${buttonPosition}`]}>{children}</div> </div> ); } } Buttongroup.defaultProps = defaultProps; Buttongroup.propTypes = propTypes; // if (__DOCS__) { // Buttongroup.docs = { // componentGroup: 'Molecule', // folderName: 'Style Guide', // external: false, // description: ' ', // images: [ // { // view: 'http://zsupport-tech-1.tsi.zohocorpin.com:8080/ui/general/ButtonGroup/v1/ButtonGroup.png', // psd: 'http://zsupport-tech-1.tsi.zohocorpin.com:8080/ui/general/ButtonGroup/v1/ButtonGroup.psd' // } // ] // }; // } |