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

feat: support prop list in all content usecases #828

Merged
merged 6 commits into from
Mar 28, 2024

Conversation

NikitaCG
Copy link
Collaborator

close #818

@gravity-ui-bot
Copy link
Contributor

Preview is ready.

@NikitaCG NikitaCG force-pushed the feat/support-prop-list-in-all-content-usecases branch from 338f02b to cc0edff Compare March 6, 2024 12:36
@@ -32,6 +32,12 @@ const DefaultTemplate: StoryFn<ExtendedFeaturesBlockModel> = (args) => (
const extendedFeaturesItems = (items: ExtendedFeaturesItem[]) => {
return items.map((item) => ({
...item,
list:
item.list &&
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

item.list?.map?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@@ -21,31 +21,29 @@ export const TabsTextContent = ({
centered,
contentSize = 's',
showMedia,
data,
data: {media, title, text, additionalInfo, link, links, buttons, list},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but data could be undefined, no?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

data is required prop, inside data we have partial fields like media and we check his existence.

@gravity-ui-bot
Copy link
Contributor

Playwright Test Component is ready.

@NikitaCG NikitaCG merged commit d4cf0f6 into main Mar 28, 2024
4 checks passed
@NikitaCG NikitaCG deleted the feat/support-prop-list-in-all-content-usecases branch March 28, 2024 11:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

support prop list in all places when used Content component
3 participants