Skip to content

How to control custom props? #1027

Answered by tianenpang
katanazero86 asked this question in Help
Discussion options

You must be logged in to vote

Refer to the Variants section in the documentation.

const Tab = styled('button', {
  // base styles

  variants: {
    active: {
      true: {
        background: "blue"
      },
      false: {
        // styles when inactive
      },
    },
  },
});

() => <Tab active={this.state.active} onClick={this.handleButton}></Tab>;

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@katanazero86
Comment options

Answer selected by katanazero86
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants