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

IQSS / dataverse-frontend / 8095940691

29 Feb 2024 12:23PM CUT coverage: 98.563% (+1.1%) from 97.491%
8095940691

Pull #328

github

MellyGray
fix(tests): set Cypress env variable for base url
Pull Request #328: 295 - Display real dataset version information in the File Page

97 of 101 branches covered (96.04%)

Branch coverage included in aggregate %.

246 of 247 relevant lines covered (99.6%)

212.45 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
type ButtonType = 'button' | 'reset' | 'submit'
9

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

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