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

IQSS / dataverse-frontend / 5401532692

28 Jun 2023 01:13PM CUT coverage: 98.336%. Remained the same
5401532692

push

github

GPortas
Fixed: typo in run-env.sh execution

136 of 142 branches covered (95.77%)

Branch coverage included in aggregate %.

455 of 459 relevant lines covered (99.13%)

72.31 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'
266✔
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({
38✔
18
  variant = 'primary',
56✔
19
  disabled = false,
66✔
20
  onClick,
21
  icon,
22
  withSpacing,
23
  children
24
}: ButtonProps) {
25
  const spacingClass = withSpacing ? styles.spacing : ''
76✔
26
  const borderClass = variant != 'link' ? styles.border : ''
76!
27

28
  return (
76✔
29
    <ButtonBS
30
      className={`${spacingClass} ${borderClass}`}
31
      variant={variant}
32
      onClick={disabled ? undefined : onClick}
76✔
33
      disabled={disabled}
34
      aria-disabled={disabled}>
35
      {icon && <span className={`${styles.icon} ${icon}`} role="img" aria-label={icon}></span>}
86✔
36
      {children}
37
    </ButtonBS>
38
  )
39
}
38✔
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