{"version":3,"sources":["../../src/Badge/Badge.tsx"],"sourcesContent":["import React, { FC, HTMLAttributes, ElementType, Ref, ReactNode, AnchorHTMLAttributes } from 'react';\nimport { Badge as BadgeReact } from 'reactstrap';\nimport { CSSModule } from 'reactstrap/types/lib/utils';\n\nexport type BadgeProps = {\n  /** Le varianti di colore definite in Bootstrap Italia */\n  color?: 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | string;\n  /** Quando attivo rende i Badge arrotondati */\n  pill?: boolean;\n  /** Utilizzarlo in caso di utilizzo di componenti personalizzati */\n  tag?: ElementType;\n  /** Classi aggiuntive da usare per il componente Badge */\n  className?: string;\n  /** Oggetto contenente la nuova mappatura per le classi CSS. */\n  cssModule?: CSSModule;\n  /** Da utilizzare per impostare un riferimento all'elemento DOM */\n  innerRef?: Ref<HTMLElement>;\n  /** Il contenuto del badge */\n  children: ReactNode;\n  testId?: string;\n} & (HTMLAttributes<HTMLElement> | AnchorHTMLAttributes<HTMLAnchorElement>);\n\nexport const Badge: FC<BadgeProps> = ({\n  color = 'secondary',\n  pill = false,\n  tag = 'span',\n  children,\n  testId,\n  ...attributes\n}) => {\n  return (\n    <BadgeReact color={color} pill={pill} tag={tag} {...attributes} data-testid={testId}>\n      {children}\n    </BadgeReact>\n  );\n};\n"],"mappings":"0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,WAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAA6F,sBAC7FC,EAAoC,sBAqBvBH,EAAwB,CAAC,CACpC,MAAAI,EAAQ,YACR,KAAAC,EAAO,GACP,IAAAC,EAAM,OACN,SAAAC,EACA,OAAAC,EACA,GAAGC,CACL,IAEI,EAAAC,QAAA,cAAC,EAAAC,MAAA,CAAW,MAAOP,EAAO,KAAMC,EAAM,IAAKC,EAAM,GAAGG,EAAY,cAAaD,GAC1ED,CACH","names":["Badge_exports","__export","Badge","__toCommonJS","import_react","import_reactstrap","color","pill","tag","children","testId","attributes","React","BadgeReact"]}