Skip to content

Commit

Permalink
fix(custom-button): fix props type
Browse files Browse the repository at this point in the history
  • Loading branch information
EGNKupava committed Dec 7, 2021
1 parent ee1d587 commit a1bf943
Showing 1 changed file with 3 additions and 53 deletions.
56 changes: 3 additions & 53 deletions packages/custom-button/src/Component.tsx
Original file line number Diff line number Diff line change
@@ -1,64 +1,14 @@
import React, { AnchorHTMLAttributes, ButtonHTMLAttributes, ElementType } from 'react';
import React, { AnchorHTMLAttributes, ButtonHTMLAttributes } from 'react';
import cn from 'classnames';

import { Button } from '@alfalab/core-components-button';
import { Button, ComponentProps as ButtonComponentProps } from '@alfalab/core-components-button';

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

const DEFAULT_BUTTON_COLOR = '#FF45C3';
const DEFAULT_CONTENT_COLOR = 'white';

export type ComponentProps = {
/**
* Слот слева
*/
leftAddons?: React.ReactNode;

/**
* Слот справа
*/
rightAddons?: React.ReactNode;

/**
* Размер компонента
*/
size?: 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl';

/**
* Растягивает компонент на ширину контейнера
*/
block?: boolean;

/**
* Дополнительный класс
*/
className?: string;

/**
* Выводит ссылку в виде кнопки
*/
href?: string;

/**
* Позволяет использовать кастомный компонент для кнопки (например Link из роутера)
*/
Component?: ElementType;

/**
* Идентификатор для систем автоматизированного тестирования
*/
dataTestId?: string;

/**
* Показать лоадер
*/
loading?: boolean;

/**
* Не переносить текст кнопки на новую строку
*/
nowrap?: boolean;

export type ComponentProps = Omit<ButtonComponentProps, 'view' | 'colors'> & {
/**
* Цвет кнопки
*/
Expand Down

0 comments on commit a1bf943

Please sign in to comment.