# All files / components/WidgetBox Footer.js

100% Statements 9/9
100% Branches 0/0
100% Functions 2/2
100% Lines 9/9

    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

    1x

    1x

    1x

    1x

    1x

    1x

    1x

    1x

    1x

     import React from 'react';
    import PropTypes from 'prop-types';
    import styled from 'styled-components';

    const StyledFlexFooter = styled.div`
        flex: 0 0 auto;
        flex-basis: ${(props) => `${props.height}px`};
      `;
    StyledFlexFooter.displayName = 'StyledFlexFooter';

    const WidgetBoxFooter = (props) => {
      const {
        children,
        height,
        className,
      } = props;

      return (
        <StyledFlexFooter className={className} height={height}>
          {children}
        </StyledFlexFooter>
      );
    };

    WidgetBoxFooter.propTypes = {
      children: PropTypes.node.isRequired,
      height: PropTypes.number,
      className: PropTypes.string,
    };

    WidgetBoxFooter.defaultProps = {
      height: 50,
      className: 'WidgetBoxFooter-Container',
    };

    WidgetBoxFooter.displayName = 'WidgetBoxFooter';

    export default WidgetBoxFooter;