# All files / components/Alert/styles AlertGroup.js

0% Statements 0/13
0% Branches 0/4
0% Functions 0/1
0% Lines 0/7

    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

     import styled from 'styled-components';
    import get from 'extensions/themeGet';
    import AlertBorder from './AlertBorder';
    import { keyframes } from 'styled-components';

    export const expandingBottomMargin = keyframes`
      from { margin-bottom: 0; }
      to { margin-bottom: ${get('spacing.medium')}; }
    `;

    const AlertGroup = styled.div`
      display: flex;
      flex-direction: column;
      align-content: stretch;

      & > ${AlertBorder}, & > ${AlertBorder.Small} {
        margin-left: 0;
        margin-right: 0;
        margin-bottom: ${get('spacing.medium')};
        animation: ${expandingBottomMargin} 0.2s ease;
      }
    `;

    AlertGroup.Global = styled(AlertGroup)`
      position: fixed;
      top: 0;
      left: ${get('spacing.large')};
      right: ${get('spacing.large')};
      padding-top: ${get('spacing.large')};
      align-content: center;
      pointer-events: none;
      z-index: 5000;

      & > ${AlertBorder}, & > ${AlertBorder.Small} {
        pointer-events: initial;
        box-shadow: ${get('shadows.short')};
        margin-left: auto;
        margin-right: auto;
      }
    `;

    export default AlertGroup;