Skip to content

[HELP] styling of element determined by renderAs prop #365

@petertodorov

Description

@petertodorov

Hello again and another question.

<Tabs>
  <Tabs.Tab renderAs="span" className="has-background-success">
    ...
  </Tabs.Tab>
</Tabs>

The code above will generate the following:

<div class="tabs">
  <ul>
    <li class="has-background-success">
      <span>
        ...
      </span>
    </li>
  </ul>
</div>

I was wondering if there is a way to style the span element (determined by the renderAs prop) based on my needs by adding a prop to the <Tabs.Tab> component?

As you can see the className='has-background-primary' styles the <li> element while I would need a way to achieve this:

<div class="tabs">
  <ul>
    <li class="has-background-success">
      <span class='p-0'>
        ...
      </span>
    </li>
  </ul>
</div>

All the best,

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions