import React from 'react'

import styles from './_spinner.module.scss'

type SpinnerProps = {
  size?: 'standard' | 'large'
  /** Optional prop to add a test id to the Spinner for QA testing */
  qaTestId?: string
}

const Spinner = ({
  size = 'standard',
  qaTestId = 'spinner',
}: SpinnerProps): React.JSX.Element => {
  return (
    <div
      className={`${styles.spinner} ${styles[size]}`}
      qa-test-id={qaTestId}
    />
  )
}

export default Spinner
