Adding border to tabs (#6284)
* Adding border to tabs * Fix rounded * Fixing mb on >= lg
This commit is contained in:
1 parent
47fe791006
commit
0141d8f954
2 files changed
+3
-3
No files matched your search
@@ -27,7 +27,7 @@ const HorizontalTabItem = function ({ name, href, linkProps, ...props }: Horizon
|
|||||||
<a
|
<a
|
||||||
className={classNames(
|
className={classNames(
|
||||||
isCurrent ? "bg-gray-200 text-gray-900" : " text-gray-600 hover:bg-gray-100 hover:text-gray-900 ",
|
isCurrent ? "bg-gray-200 text-gray-900" : " text-gray-600 hover:bg-gray-100 hover:text-gray-900 ",
|
||||||
"mb-2 inline-flex items-center justify-center whitespace-nowrap rounded-md py-[10px] px-4 text-sm font-medium leading-4 md:mb-0",
|
"inline-flex items-center justify-center whitespace-nowrap rounded-[4px] py-[10px] px-4 text-sm font-medium leading-4 md:mb-0",
|
||||||
props.disabled && "pointer-events-none !opacity-30",
|
props.disabled && "pointer-events-none !opacity-30",
|
||||||
props.className
|
props.className
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -10,8 +10,8 @@ export interface NavTabProps {
|
|||||||
|
|
||||||
const HorizontalTabs = function ({ tabs, linkProps, actions, ...props }: NavTabProps) {
|
const HorizontalTabs = function ({ tabs, linkProps, actions, ...props }: NavTabProps) {
|
||||||
return (
|
return (
|
||||||
<div className="-mx-6 mb-2 w-[calc(100%+40px)]">
|
<div className="mb-2 max-w-[calc(100%+40px)] lg:mb-5">
|
||||||
<nav className="no-scrollbar flex space-x-1 overflow-scroll px-6" aria-label="Tabs" {...props}>
|
<nav className="no-scrollbar flex overflow-scroll rounded-md border p-1" aria-label="Tabs" {...props}>
|
||||||
{tabs.map((tab, idx) => (
|
{tabs.map((tab, idx) => (
|
||||||
<HorizontalTabItem {...tab} key={idx} {...linkProps} />
|
<HorizontalTabItem {...tab} key={idx} {...linkProps} />
|
||||||
))}
|
))}
|
||||||
|
|||||||
Reference in new issue
Block a user