All files / src/components/Button/Container index.jsx

100% Statements 3/3
100% Branches 0/0
100% Functions 1/1
100% Lines 2/2
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22            2x               2x              
import styles from './style.postcss';
 
import React from 'react';
import classnames from 'classnames';
import PropTypes from 'prop-types';
 
export const ButtonContainer = ({ align, className, children }) => <div className={
    classnames(styles.ButtonContainer, {
      [styles.__alignRight]: align === 'right',
      [styles.__alignCenter]: align === 'center',
    }, className)}>
  {children}
</div>;
 
ButtonContainer.propTypes = {
  align: PropTypes.oneOf(['left', 'right', 'center']),  // default: left
  className: PropTypes.string,
  children: PropTypes.node,
};
 
export default ButtonContainer;