<Tabs className={styles.tabs} activeKey={`${activeTab}`} onChange={tab => { this.setState({ activeTab: tab }); }} > {tabsData.map((o, index) => ( <Tabs.TabPane key={`${index}`} tab={ <span> {o.name} <Badge count={23499} overflowCount={9999} style={{ backgroundColor: '#52c41a',display:'relative', top:'-2px',marginLeft:'5px'}} /> </span> } > <TabContent onRef={this.onRef} activeTab={activeTab} testValues={testValues} /> </Tabs.TabPane> ))} </Tabs>