Skip to content

Commit

Permalink
feat: universal-modal typings
Browse files Browse the repository at this point in the history
  • Loading branch information
fulcanellee committed Nov 12, 2024
1 parent 6c496fb commit c6f51c0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
2 changes: 1 addition & 1 deletion packages/universal-modal/src/desktop/types/props.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export type BaseUniversalModalProps = {
};

export type UniversalModalDesktopProps = BaseUniversalModalProps &
Pick<BaseModalProps, 'children' | 'dataTestId' | 'open'>;
Pick<BaseModalProps, 'children' | 'dataTestId' | 'open' | 'className'>;

export type ModalBySideProps = UniversalModalDesktopProps &
Pick<DrawerProps, 'contentTransitionProps'> &
Expand Down
2 changes: 1 addition & 1 deletion packages/universal-modal/src/mobile/Component.mobile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import { TResponsiveModalContext } from '../typings';
import { UniversalModalMobileProps } from './types/props';

import styles from './mobile.module.css';
import transitions from './transitions/transitions.mobile.module.css';
import rightSideTransitons from './transitions/right-side-transitions.mobile.module.css';
import transitions from './transitions/transitions.mobile.module.css';

const UniversalModalMobileComponent = forwardRef<HTMLDivElement, UniversalModalMobileProps>(
({ children, className, dataTestId, onClose, appearance = 'bottom', ...restProps }, ref) => {
Expand Down
11 changes: 4 additions & 7 deletions packages/universal-modal/src/typings.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import { BaseModalProps } from '@alfalab/core-components-base-modal';

import { BaseUniversalModalProps } from './desktop/types/props';
import { BaseUniversalModalMobileProps } from './mobile/types/props';
import { UniversalModalDesktopProps } from './desktop/types/props';
import { UniversalModalMobileProps } from './mobile/types/props';

export type View = 'desktop' | 'mobile';

Expand All @@ -16,9 +14,8 @@ export type TResponsiveModalContext = {
setModalFooterHighlighted?: (value: boolean) => void;
} | null;

export type UniversalModalResponsiveProps = BaseUniversalModalProps &
BaseUniversalModalMobileProps &
Pick<BaseModalProps, 'children' | 'dataTestId' | 'open'> & {
export type UniversalModalResponsiveProps = UniversalModalDesktopProps &
UniversalModalMobileProps & {
/**
* Контрольная точка, с нее начинается desktop версия
* @default 1024
Expand Down

0 comments on commit c6f51c0

Please sign in to comment.