Skip to content

Commit

Permalink
chore(spinner): useless types module
Browse files Browse the repository at this point in the history
  • Loading branch information
hextion committed Oct 28, 2024
1 parent 7d9c660 commit 1a6e493
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 50 deletions.
46 changes: 44 additions & 2 deletions packages/spinner/src/Component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,54 @@ import cn from 'classnames';
import { devWarning, fnUtils } from '@alfalab/core-components-shared';
import { useId } from '@alfalab/hooks';

import { SpinnerProps } from './types';

import defaultColors from './default.module.css';
import styles from './index.module.css';
import invertedColors from './inverted.module.css';

export interface SpinnerProps {
/**
* Палитра, в контексте которой используется спиннер
* @default default
*/
colors?: 'default' | 'inverted';

/**
* Управление видимостью компонента
* @default false
*/
visible?: boolean;

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

/**
* Идентификатор компонента в DOM
*/
id?: string;

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

/**
* Размер спиннера (кольца)
*/
size: number;

/**
* Толщина линии спинера (кольца)
*/
lineWidth: number;

/**
* Дополнительные инлайн стили для cпиннера
*/
style?: React.CSSProperties;
}

const colorStyles = {
default: defaultColors,
inverted: invertedColors,
Expand Down
1 change: 0 additions & 1 deletion packages/spinner/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
export * from './Component';
export * from './types';
3 changes: 1 addition & 2 deletions packages/spinner/src/preset/Component.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import React, { FC } from 'react';
import cn from 'classnames';

import { Spinner } from '../Component';
import { SpinnerProps } from '../types';
import { Spinner, SpinnerProps } from '../Component';

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

Expand Down
45 changes: 0 additions & 45 deletions packages/spinner/src/types.ts

This file was deleted.

0 comments on commit 1a6e493

Please sign in to comment.