Skip to content

Commit

Permalink
feat(collapse): change icon to css;
Browse files Browse the repository at this point in the history
  • Loading branch information
denisx committed Dec 23, 2024
1 parent 98ebcc5 commit 2dec6e0
Show file tree
Hide file tree
Showing 11 changed files with 4 additions and 52 deletions.
7 changes: 0 additions & 7 deletions packages/alert/src/Component.responsive.tsx

This file was deleted.

15 changes: 2 additions & 13 deletions packages/alert/src/Component.tsx
Original file line number Diff line number Diff line change
@@ -1,24 +1,13 @@
import React, { FC } from 'react';
import cn from 'classnames';

import { type Plate, type PlateProps } from '@alfalab/core-components-plate';
import { type PlateDesktop } from '@alfalab/core-components-plate/desktop';
import { type PlateMobile } from '@alfalab/core-components-plate/mobile';
import { Plate, PlateProps } from '@alfalab/core-components-plate';

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

export type AlertProps = Omit<PlateProps, 'foldable' | 'defaultFolded' | 'leftAddons'>;

type AlertPrivateProps = {
Plate: typeof Plate | typeof PlateDesktop | typeof PlateMobile;
};

export const AlertBase: FC<AlertProps & AlertPrivateProps> = ({
className,
title,
Plate,
...restProps
}) => (
export const Alert: FC<AlertProps> = ({ className, title, ...restProps }) => (
<Plate
className={cn(styles.component, className)}
title={title ? <span className={styles.title}>{title}</span> : null}
Expand Down
7 changes: 0 additions & 7 deletions packages/alert/src/desktop/Component.tsx

This file was deleted.

1 change: 0 additions & 1 deletion packages/alert/src/desktop/index.ts

This file was deleted.

3 changes: 0 additions & 3 deletions packages/alert/src/desktop/package.json

This file was deleted.

7 changes: 0 additions & 7 deletions packages/alert/src/docs/development.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,7 @@ import { Alert } from '../index';
## Подключение

```jsx
// Респонсив
import { Alert } from '@alfalab/core-components/alert';

// Десктоп
import { AlertDesktop } from '@alfalab/core-components/alert/desktop';

// Мобайл
import { AlertMobile } from '@alfalab/core-components/alert/mobile';
```

## Свойства
Expand Down
3 changes: 1 addition & 2 deletions packages/alert/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
export { AlertResponsive as Alert } from './Component.responsive';
export { type AlertProps } from './Component';
export * from './Component';
7 changes: 0 additions & 7 deletions packages/alert/src/mobile/Component.tsx

This file was deleted.

1 change: 0 additions & 1 deletion packages/alert/src/mobile/index.ts

This file was deleted.

3 changes: 0 additions & 3 deletions packages/alert/src/mobile/package.json

This file was deleted.

2 changes: 1 addition & 1 deletion packages/alert/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"baseUrl": ".",
"paths": {
"@alfalab/core-components-*": ["../*/src"],
"@alfalab/core-components-plate/*": ["../plate/src/*"]
"@alfalab/core-components-button/*": ["../button/src/*"]
}
},
"references": [{ "path": "../plate" }]
Expand Down

0 comments on commit 2dec6e0

Please sign in to comment.