Skip to content

Conversation

@siddharthkp
Copy link
Contributor

Using Text inside Collapsible instead of creating new elements.

The stories are especially interesting.


return (
<Element as="section" {...props}>
<Section {...props}>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm curious, how would it be to write the styles in place -

<Element as="section" css={{fontSize: 3}}>

vs

const Section = styled(Element).attrs({ as: 'section' })(
  css({
    fontSize: 3,
  })
);

Copy link
Contributor

Choose a reason for hiding this comment

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

I perfer the top one but I think we should use the bottom one as it's more js like and I know drake also perfers that one

@lbogdan
Copy link
Contributor

lbogdan commented Jan 8, 2020

Build for latest commit aff16cf is at https://pr3291.build.csb.dev/s/new.

@SaraVieira SaraVieira merged commit 0f0cda0 into master Jan 8, 2020
@SaraVieira SaraVieira deleted the text-usage branch January 8, 2020 13:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants