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

IQSS / dataverse-frontend / 6158834163

12 Sep 2023 11:29AM CUT coverage: 98.58% (-0.04%) from 98.617%
6158834163

push

github

MellyGray
feat(DatasetActionButtons): add EditDatasetMenu component

97 of 101 branches covered (0.0%)

Branch coverage included in aggregate %.

250 of 251 relevant lines covered (99.6%)

209.98 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 { HTMLAttributes, MouseEvent, ReactNode } from 'react'
798✔
2
import styles from './Button.module.scss'
3
import { Button as ButtonBS } from 'react-bootstrap'
4
import { IconName } from '../icon/IconName'
5
import { Icon } from '../icon/Icon'
6

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

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

114✔
18
export function Button({
168✔
19
  variant = 'primary',
198✔
20
  disabled = false,
21
  onClick,
22
  icon,
23
  withSpacing,
24
  children,
25
  ...props
228✔
26
}: ButtonProps) {
228!
27
  return (
28
    <ButtonBS
228✔
29
      className={withSpacing ? styles.spacing : ''}
30
      variant={variant}
31
      onClick={disabled ? undefined : onClick}
32
      disabled={disabled}
228✔
33
      aria-disabled={disabled}
34
      {...props}>
35
      {typeof icon === 'string' ? <Icon name={icon} /> : icon}
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