# All files / src/SuperSelect/presets contactsPreset.tsx

50% Statements 3/6
100% Branches 0/0
0% Functions 0/1
60% Lines 3/5

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
    252x
    2x

    2x

     import React from 'react'
    import { ContactItem } from '../../ContactItem'
    import { SuperSelectConfig } from '../SuperSelect.types'

    export const contactsPreset: SuperSelectConfig = {
      selectionStyle: 'checkmark',
      components: {
        OptionLabel: ({ option, ...props }) => {
          return (
            <ContactItem
              {...props}
              initials={option.initials}
              icon={option.icon}
              disabled={option.disabled}
            >
              <ContactItem.Title>{option.title}</ContactItem.Title>
              <ContactItem.Description>
                {option.description}
              </ContactItem.Description>
            </ContactItem>
          )
        },
      },
    }