Загрузка данных


import classNames from 'classnames';
import { Button as ExchangeButton } from 'exchange-elements/v2';
import { type ComponentProps } from 'react';

import styles from './index.module.scss';

type ExchangeButtonProps = ComponentProps<typeof ExchangeButton>;

interface ButtonProps extends ExchangeButtonProps {
  pressed?: boolean;
  selected?: boolean;
}

export function Button({
  size = 'sm',
  pressed = false,
  selected = false,
  className,
  ...props
}: ButtonProps) {
  return (
    <ExchangeButton
      {...props}
      size={size}
      className={classNames(styles.button, className, {
        [styles.pressed]: pressed,
        [styles.selected]: selected,
      })}
    />
  );
}