Skip to content

Headless Component Library #224

Answered by nmn
Tech-Dex asked this question in Q&A
Dec 20, 2023 · 2 comments · 14 replies
Discussion options

You must be logged in to vote

I found the documentation a bit unclear as well, but if you need to observe data-state within StyleX, it's possible with a workaround:

const styles = stylex.create({
  accordianItem: {
    borderBottomWidth: {
      default: 1,
      ':is([data-state=open])': 2,
    },
    borderBottomStyle: 'solid',
    borderBottomColor: 'gainsboro',
  }
});

NOTE: This is a workaround and may stop working sometime in the future.

Replies: 2 comments 14 replies

Comment options

You must be logged in to vote
8 replies
@Tech-Dex
Comment options

@necolas
Comment options

@nmn
Comment options

Answer selected by nmn
@Tech-Dex
Comment options

@nmn
Comment options

@vladmoroz
Comment options

@nmn
Comment options

Comment options

You must be logged in to vote
6 replies
@nucleartux
Comment options

@nmn
Comment options

@BMCwebdev
Comment options

@BMCwebdev
Comment options

@predaytor
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
8 participants