All files / atom/icon/src settings.js

100% Statements 7/7
100% Branches 2/2
100% Functions 1/1
100% Lines 7/7

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 361x   1x                   1x                 1x         1x   1x 6x            
export const BASE_CLASS = 'sui-AtomIcon'
 
export const ATOM_ICON_COLORS = {
  accent: 'accent',
  alert: 'alert',
  currentColor: 'currentColor',
  error: 'error',
  primary: 'primary',
  success: 'success',
  gray: 'gray'
}
 
export const ATOM_ICON_SIZES = {
  extraSmall: 'extraSmall',
  small: 'small',
  medium: 'medium',
  large: 'large',
  extraLarge: 'extraLarge',
  extraExtraLarge: 'extraExtraLarge'
}
 
export const ATOM_ICON_RENDERS = {
  eager: 'eager',
  lazy: 'lazy'
}
 
export const IMG_ROLE = 'img'
 
export const getAttributes = title =>
  title
    ? {
        role: IMG_ROLE,
        'aria-label': title
      }
    : {}