• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

IQSS / dataverse-frontend / 5268433908

14 Jun 2023 02:30PM CUT coverage: 98.446%. Remained the same
5268433908

push

github

MellyGray
feat(MetadataBlockInfo): get displayFormat info from the tsvs to display correctly the metadata fields

102 of 107 branches covered (95.33%)

Branch coverage included in aggregate %.

278 of 279 relevant lines covered (99.64%)

214.22 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

94.12
/packages/design-system/src/lib/components/button/Button.tsx
1
import { MouseEvent, ReactNode } from 'react'
798✔
2
import styles from './Button.module.scss'
3
import { Button as ButtonBS } from 'react-bootstrap'
4
import { Icon } from '../Icon.enum'
5

6
type ButtonVariant = 'primary' | 'secondary' | 'link'
7

8
interface ButtonProps {
9
  variant?: ButtonVariant
10
  disabled?: boolean
11
  onClick?: (event: MouseEvent<HTMLButtonElement>) => void
12
  icon?: Icon
13
  withSpacing?: boolean
14
  children: ReactNode
15
}
16

17
export function Button({
114✔
18
  variant = 'primary',
168✔
19
  disabled = false,
198✔
20
  onClick,
21
  icon,
22
  withSpacing,
23
  children
24
}: ButtonProps) {
25
  const spacingClass = withSpacing ? styles.spacing : ''
228✔
26
  const borderClass = variant != 'link' ? styles.border : ''
228!
27

28
  return (
228✔
29
    <ButtonBS
30
      className={`${spacingClass} ${borderClass}`}
31
      variant={variant}
32
      onClick={disabled ? undefined : onClick}
228✔
33
      disabled={disabled}
34
      aria-disabled={disabled}>
35
      {icon && <span className={`${styles.icon} ${icon}`} role="img" aria-label={icon}></span>}
258✔
36
      {children}
37
    </ButtonBS>
38
  )
39
}
114✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc