Skip to content
Snippets Groups Projects
Commit 7807f1cb authored by Dennis Collaris's avatar Dennis Collaris Committed by Leonardo Christino
Browse files

fix: prevent warning about invalid nesting of button in DOM

parent 6d5ed228
No related branches found
No related tags found
1 merge request!291fix: prevent warning about invalid nesting of button in DOM
Pipeline #140992 passed
......@@ -30,7 +30,6 @@ export const Tabs = (props: { children: React.ReactNode; tabType?: TabTypes }) =
export const Tab = ({
activeTab,
text,
variant = 'ghost',
className = '',
...props
}: ButtonProps & {
......@@ -43,7 +42,7 @@ export const Tab = ({
if (context.tabType === 'inline') {
className += ` pl-2 pr-1 gap-1 relative h-full text-secondary-500 border-secondary-200 before:content-['']
before:absolute before:left-0 before:bottom-0 before:h-[2px] before:w-full
${activeTab ? 'before:bg-primary-500' : 'before:bg-transparent hover:before:bg-secondary-300 hover:bg-secondary-200'}`;
${activeTab ? 'before:bg-primary-500 hover:bg-inherit' : 'before:bg-transparent hover:before:bg-secondary-300 hover:text-dark hover:bg-secondary-200'}`;
} else if (context.tabType === 'rounded') {
className += ` -mb-px py-4 px-4 text-sm text-secondary-500 text-center border rounded-t-lg rounded-b-none
${activeTab ? 'active text-secondary-950 border-l-secondary-300 border-r-secondary-300 border-t-secondary-300 border-b-white' : ''}
......@@ -53,10 +52,10 @@ export const Tab = ({
}
return (
<Button className={className} label={text} variant={variant} size="xs" {...props}>
{/* <p className={`text-xs font-semibold ${activeTab && 'text-secondary-950'}`}>{text}</p> */}
<div className={`btn btn-ghost btn-xs rounded-none ${className}`} {...props}>
<span>{text}</span>
{props.children}
</Button>
</div>
);
};
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment