HEX
Server: LiteSpeed
System: Linux premium212.web-hosting.com 4.18.0-553.124.4.lve.el8.x86_64 #1 SMP Fri May 15 13:02:13 UTC 2026 x86_64
User: vitanhod (1367)
PHP: 8.2.31
Disabled: NONE
Upload Files
File: /home/vitanhod/barnabites.es/wp-content/plugins/rishi-companion/src/admin/ui-components/TabNav.js
import styled from "@emotion/styled"

const Nav = styled.div`
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin: 0 0 24px;
    button.rishi-nav-tab{
        padding: 12px 16px;
        background: #eff5fb;
        border: none;
        border-radius: 4px;
        cursor: pointer;
        font-weight: 500;
        transition: all .2s ease;
        &[data-active="true"]{
            background-color: #307ac9;
            color: #ffffff;
        }
    }
`

const TabNav = ({ active, onActive, tabs }) => {
    return (
        <Nav>
            {tabs.map(({ id, label }) => {
                return <button
                    type="button"
                    className="rishi-nav-tab"
                    data-active={active === id}
                    onClick={() => onActive(id)}
                    key={id}
                >
                    {label}
                </button>
            })}
        </Nav>
    )
}

export default TabNav