mirror of
https://github.com/wassname/talk.git
synced 2026-09-11 12:51:33 +08:00
Adding styling
This commit is contained in:
@@ -5,10 +5,14 @@ export interface TabContentProps {
|
||||
* Active tab id/name
|
||||
*/
|
||||
activeTab?: string;
|
||||
/**
|
||||
* classNames
|
||||
*/
|
||||
className?: string;
|
||||
}
|
||||
|
||||
const TabContent: StatelessComponent<TabContentProps> = props => {
|
||||
const { children, activeTab } = props;
|
||||
const { children, activeTab, className } = props;
|
||||
return (
|
||||
<>
|
||||
{React.Children.toArray(children)
|
||||
@@ -18,6 +22,7 @@ const TabContent: StatelessComponent<TabContentProps> = props => {
|
||||
.map((child: React.ReactElement<any>, i) =>
|
||||
React.cloneElement(child, {
|
||||
tabId: child.props.tabId ? child.props.tabId : i,
|
||||
className,
|
||||
})
|
||||
)}
|
||||
</>
|
||||
|
||||
Reference in New Issue
Block a user