Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FieldComponents Canary: сделать экспорты в библиотеке + поправить пропсы у FieldControlLayout #3814

Closed
vpanfilov opened this issue Nov 7, 2024 · 1 comment · Fixed by #3817
Assignees
Labels
bug Something isn't working dev 🔥🔥🔥 priority
Milestone

Comments

@vpanfilov
Copy link

Описание бага
Не реализован экспорт компонетов в Consta UI, импорты по аналогии с текстом документации не работают:

// Данный импорт не работает, Typescript выдаёт ошибку Cannot find module '@consta/uikit/FieldComponents' or its corresponding type declarations
import { FieldWrapper, FieldControlLayout } from '@consta/uikit/FieldComponents';

// Сейчас работает только так:
import {
  FieldWrapper,
  FieldControlLayout,
} from '@consta/uikit/__internal__/src/components/FieldComponents';

Также есть проблема с использованием компонента FieldControlLayout. Если его указать без пропсов, то выдаётся ошибка:

Type '{ children: Element; }' is missing the following properties from type 'Pick<FieldControlLayoutProps, "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | ... 259 more ... | "onPointerLeaveCapture">': placeholder, onPointerEnterCapture, onPointerLeaveCapture

Приходится вручную задавать undefined для этих пропсов:

<FieldControlLayout
  placeholder={undefined}
  onPointerEnterCapture={undefined}
  onPointerLeaveCapture={undefined}
>
  ...
</FieldControlLayout>

Версия Consta Kit
5.13

@vpanfilov vpanfilov added the bug Something isn't working label Nov 7, 2024
@ZettZet
Copy link
Contributor

ZettZet commented Nov 8, 2024

Второй баг это дубль #3655

@gizeasy gizeasy self-assigned this Nov 13, 2024
@gizeasy gizeasy added this to Consta Nov 13, 2024
@gizeasy gizeasy added this to the 27.11.2024 milestone Nov 13, 2024
@gizeasy gizeasy moved this to To do in Consta Nov 13, 2024
gizeasy added a commit that referenced this issue Nov 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working dev 🔥🔥🔥 priority
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants