Skip to content

Slots audit#357

Merged
dannify merged 2 commits intomasterfrom
slots-audit
Apr 3, 2020
Merged

Slots audit#357
dannify merged 2 commits intomasterfrom
slots-audit

Conversation

@devongovett
Copy link
Copy Markdown
Member

Removes the slot prop from everything except "content" components (typography, icon, image, etc.). A few additional "container" components can receive slot props from context but not have a custom slot name (e.g. header, footer, content) - they have a default slot name derived from the component name.

In addition, this separates <SlotProvider> from <Grid> and <Flex> so the layout components can be used without providing slots.

@adobe-bot
Copy link
Copy Markdown

Build successful! 🎉


export function UIIcon(props: IconProps) {
props = useSlotProps(props, 'uiIcon');
props = useSlotProps(props, 'icon');
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

ui icon and icon default to slot icon?
should ui icon have a default?

snowystinger
snowystinger previously approved these changes Apr 3, 2020
@dannify dannify dismissed snowystinger’s stale review April 3, 2020 17:12

The base branch was changed.

@dannify dannify changed the base branch from audit-m2-2 to master April 3, 2020 17:12
@dannify dannify merged commit df5d830 into master Apr 3, 2020
@dannify dannify deleted the slots-audit branch April 3, 2020 17:30
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.

4 participants