# All files / src/EmptyState EmptyState.coverage.stories.tsx

100% Statements 42/42
100% Branches 0/0
100% Functions 12/12
100% Lines 18/18

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
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    1661x
    1x
    1x
    1x

    1x

    1x

    1x

    1x

    1x

    1x

    1x

    1x

    1x

    1x

    1x

    1x

    1x

    1x

     import React from 'react'
    import { Button } from '../Button/Button'
    import imageSrc from './assets/default.stories.png'
    import { EmptyState } from './EmptyState'

    const title = 'Coverage/EmptyState'

    export default {
      component: EmptyState,
      title,
    }

    export const Basic = () => (
      <EmptyState>
        <EmptyState.NoItems />
        <EmptyState.Title>Empty State Title</EmptyState.Title>
        <EmptyState.Description>
          Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do Lorm
          tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim
          veniam, quis nostrud exercitation
        </EmptyState.Description>
        <EmptyState.Actions>
          <Button>Action Button</Button>
        </EmptyState.Actions>
      </EmptyState>
    )

    export const ImageChildren = () => (
      <EmptyState>
        <EmptyState.Image>
          <img src={imageSrc} />
        </EmptyState.Image>
        <EmptyState.Title>Empty State Title</EmptyState.Title>
        <EmptyState.Description>
          Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do Lorm
          tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim
          veniam, quis nostrud exercitation
        </EmptyState.Description>
        <EmptyState.Actions>
          <Button>Action Button</Button>
        </EmptyState.Actions>
      </EmptyState>
    )

    export const ImageChildrenCompact = () => (
      <EmptyState compact={true}>
        <EmptyState.Image src={imageSrc} />
        <EmptyState.Title>Empty State Title</EmptyState.Title>
        <EmptyState.Description>
          Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do Lorm
          tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim
          veniam, quis nostrud exercitation
        </EmptyState.Description>
        <EmptyState.Actions>
          <Button>Action Button</Button>
        </EmptyState.Actions>
      </EmptyState>
    )

    export const ParagraphDescription = () => (
      <EmptyState>
        <EmptyState.Image src={imageSrc} />
        <EmptyState.Title>Empty State Title</EmptyState.Title>
        <EmptyState.Description as={'p'}>
          Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do Lorm
          tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim
          veniam, quis nostrud exercitation
        </EmptyState.Description>
        <EmptyState.Actions>
          <Button>Action Button</Button>
        </EmptyState.Actions>
      </EmptyState>
    )

    export const NoItemsWithCreatePermissions = () => (
      <EmptyState>
        <EmptyState.NoItems />
        <EmptyState.Title>Create RFIs to Get Started</EmptyState.Title>
        <EmptyState.Description>
          The RFIs tool helps your team create and respond to incoming questions.
          Once you create RFIs, you can manage them here.
        </EmptyState.Description>
        <EmptyState.Actions>
          <Button>Action Button</Button>
        </EmptyState.Actions>
      </EmptyState>
    )

    export const NoItemsWithCreatePermissionsCompact = () => (
      <EmptyState compact>
        <EmptyState.NoItems />
        <EmptyState.Title>Create RFIs to Get Started</EmptyState.Title>
        <EmptyState.Description>
          The RFIs tool helps your team create and respond to incoming questions.
          Once you create RFIs, you can manage them here.
        </EmptyState.Description>
        <EmptyState.Actions>
          <Button>Action Button</Button>
        </EmptyState.Actions>
      </EmptyState>
    )

    export const NoItemsWithoutCreatePermissions = () => (
      <EmptyState>
        <EmptyState.NoItemsWithoutCreatePermissions />
        <EmptyState.Title>There Are No RFIs to Display Right Now</EmptyState.Title>
        <EmptyState.Description>
          The RFIs tool helps your team create and respond to incoming questions.
          Once your team creates RFIs, you can access them here.
        </EmptyState.Description>
      </EmptyState>
    )

    export const NoItemsWithoutCreatePermissionsCompact = () => (
      <EmptyState compact>
        <EmptyState.NoItemsWithoutCreatePermissions />
        <EmptyState.Title>There Are No RFIs to Display Right Now</EmptyState.Title>
        <EmptyState.Description>
          The RFIs tool helps your team create and respond to incoming questions.
          Once your team creates RFIs, you can access them here.
        </EmptyState.Description>
      </EmptyState>
    )

    export const NoResults = () => (
      <EmptyState>
        <EmptyState.NoResults />
        <EmptyState.Title>No Drawings Match Your Search</EmptyState.Title>
        <EmptyState.Description>
          Check your spelling and filter options, or search for a different keyword.
        </EmptyState.Description>
      </EmptyState>
    )

    export const NoResultsCompact = () => (
      <EmptyState compact={true}>
        <EmptyState.NoResults />
        <EmptyState.Title>No Drawings Match Your Search</EmptyState.Title>
        <EmptyState.Description>
          Check your spelling and filter options, or search for a different keyword.
        </EmptyState.Description>
      </EmptyState>
    )

    export const RecyleBin = () => (
      <EmptyState>
        <EmptyState.RecycleBin />
        <EmptyState.Title>No Drawings Match Your Search</EmptyState.Title>
        <EmptyState.Description>
          When you delete inspections, you will be able to view and retrieve them
          here.
        </EmptyState.Description>
      </EmptyState>
    )

    export const RecyleBinCompact = () => (
      <EmptyState compact={true}>
        <EmptyState.RecycleBin />
        <EmptyState.Title>No Drawings Match Your Search</EmptyState.Title>
        <EmptyState.Description>
          When you delete inspections, you will be able to view and retrieve them
          here.
        </EmptyState.Description>
      </EmptyState>
    )