Skip to content

support margin modifiers in SkeletonView #1807

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

Merged
merged 1 commit into from
Feb 4, 2022

Conversation

lidord-wix
Copy link
Contributor

Description

Support margin modifiers in SkeletonView
WOAUILIB-2175

Changelog

Support margin modifiers in SkeletonView Component

const key = timesKey ? `${timesKey}-${index}` : `${index}`;
return (
<SkeletonView
modifiers={{}}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we pass null here instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It throws a TS error:
Type 'null' is not assignable to type 'ExtractedStyle'.ts(2322)
I can set it to null and add a @ts-expect-error, wdyt?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Where the modifiers prop typing comes from?
What about passing undefined or is that ignored?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Same error for undefined as well.
The type comes from asBaseComponent:
modifiers: ReturnType<typeof Modifiers.generateModifiersStyle>;

Copy link
Collaborator

Choose a reason for hiding this comment

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

Got it, ok. Approving..

@lidord-wix lidord-wix requested a review from ethanshar January 31, 2022 09:16
@ethanshar ethanshar merged commit 200f28b into master Feb 4, 2022
@lidord-wix lidord-wix deleted the feat/SkeletonView_margins branch February 22, 2022 13:05
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.

2 participants