PLASMA-5871: add polymorphic type to component#2689
Open
TitanKuzmich wants to merge 2 commits intodevfrom
Open
PLASMA-5871: add polymorphic type to component#2689TitanKuzmich wants to merge 2 commits intodevfrom
TitanKuzmich wants to merge 2 commits intodevfrom
Conversation
Contributor
|
Theme Builder app deployed! https://plasma.sberdevices.ru/pr/plasma-theme-builder-pr-2689/ |
Contributor
93c4531 to
c2179ec
Compare
shuga2704
requested changes
Apr 13, 2026
| @@ -1,4 +1,5 @@ | |||
| import { buttonConfig, component, mergeConfig } from '@salutejs/plasma-new-hope/styled-components'; | |||
| import type { MakePolymorphic } from '@salutejs/plasma-new-hope/styled-components'; | |||
Contributor
There was a problem hiding this comment.
Типы импортируем просто из @salutejs/plasma-new-hope
| * Кнопка. | ||
| */ | ||
| export const Button = ButtonComponent; | ||
| export const Button = (ButtonComponent as unknown) as MakePolymorphic<typeof ButtonComponent, 'button'>; |
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Core
Typings
asWhat/why changed
добавлен тип для полиморфных компонентов со свойством
as📦 Published PR as canary version:
Canary Versions✨ Test out this PR locally via:
npm install @salutejs/plasma-asdk@0.372.0-canary.2689.24330727923.0 npm install @salutejs/plasma-b2c@1.614.0-canary.2689.24330727923.0 npm install @salutejs/plasma-core@1.223.0-canary.2689.24330727923.0 npm install @salutejs/plasma-giga@0.341.0-canary.2689.24330727923.0 npm install @salutejs/plasma-homeds@0.341.0-canary.2689.24330727923.0 npm install @salutejs/plasma-hope@1.369.0-canary.2689.24330727923.0 npm install @salutejs/plasma-icons@1.235.0-canary.2689.24330727923.0 npm install @salutejs/plasma-new-hope@0.358.0-canary.2689.24330727923.0 npm install @salutejs/plasma-tokens@1.135.0-canary.2689.24330727923.0 npm install @salutejs/plasma-ui@1.345.0-canary.2689.24330727923.0 npm install @salutejs/plasma-web@1.616.0-canary.2689.24330727923.0 npm install @salutejs/sdds-bizcom@0.346.0-canary.2689.24330727923.0 npm install @salutejs/sdds-cs@0.350.0-canary.2689.24330727923.0 npm install @salutejs/sdds-dfa@0.344.0-canary.2689.24330727923.0 npm install @salutejs/sdds-finai@0.337.0-canary.2689.24330727923.0 npm install @salutejs/sdds-insol@0.341.0-canary.2689.24330727923.0 npm install @salutejs/sdds-netology@0.345.0-canary.2689.24330727923.0 npm install @salutejs/sdds-os@0.16.0-canary.2689.24330727923.0 npm install @salutejs/sdds-platform-ai@0.345.0-canary.2689.24330727923.0 npm install @salutejs/sdds-sbcom@0.345.0-canary.2689.24330727923.0 npm install @salutejs/sdds-scan@0.344.0-canary.2689.24330727923.0 npm install @salutejs/sdds-serv@0.345.0-canary.2689.24330727923.0 npm install @salutejs/plasma-themes@0.47.0-canary.2689.24330727923.0 npm install @salutejs/sdds-themes@0.62.0-canary.2689.24330727923.0 npm install @salutejs/sdds-api-tests@0.3.0-canary.2689.24330727923.0 npm install @salutejs/plasma-cy-utils@0.153.0-canary.2689.24330727923.0 npm install @salutejs/plasma-sb-utils@0.223.0-canary.2689.24330727923.0 # or yarn add @salutejs/plasma-asdk@0.372.0-canary.2689.24330727923.0 yarn add @salutejs/plasma-b2c@1.614.0-canary.2689.24330727923.0 yarn add @salutejs/plasma-core@1.223.0-canary.2689.24330727923.0 yarn add @salutejs/plasma-giga@0.341.0-canary.2689.24330727923.0 yarn add @salutejs/plasma-homeds@0.341.0-canary.2689.24330727923.0 yarn add @salutejs/plasma-hope@1.369.0-canary.2689.24330727923.0 yarn add @salutejs/plasma-icons@1.235.0-canary.2689.24330727923.0 yarn add @salutejs/plasma-new-hope@0.358.0-canary.2689.24330727923.0 yarn add @salutejs/plasma-tokens@1.135.0-canary.2689.24330727923.0 yarn add @salutejs/plasma-ui@1.345.0-canary.2689.24330727923.0 yarn add @salutejs/plasma-web@1.616.0-canary.2689.24330727923.0 yarn add @salutejs/sdds-bizcom@0.346.0-canary.2689.24330727923.0 yarn add @salutejs/sdds-cs@0.350.0-canary.2689.24330727923.0 yarn add @salutejs/sdds-dfa@0.344.0-canary.2689.24330727923.0 yarn add @salutejs/sdds-finai@0.337.0-canary.2689.24330727923.0 yarn add @salutejs/sdds-insol@0.341.0-canary.2689.24330727923.0 yarn add @salutejs/sdds-netology@0.345.0-canary.2689.24330727923.0 yarn add @salutejs/sdds-os@0.16.0-canary.2689.24330727923.0 yarn add @salutejs/sdds-platform-ai@0.345.0-canary.2689.24330727923.0 yarn add @salutejs/sdds-sbcom@0.345.0-canary.2689.24330727923.0 yarn add @salutejs/sdds-scan@0.344.0-canary.2689.24330727923.0 yarn add @salutejs/sdds-serv@0.345.0-canary.2689.24330727923.0 yarn add @salutejs/plasma-themes@0.47.0-canary.2689.24330727923.0 yarn add @salutejs/sdds-themes@0.62.0-canary.2689.24330727923.0 yarn add @salutejs/sdds-api-tests@0.3.0-canary.2689.24330727923.0 yarn add @salutejs/plasma-cy-utils@0.153.0-canary.2689.24330727923.0 yarn add @salutejs/plasma-sb-utils@0.223.0-canary.2689.24330727923.0