chore: removes pseudo element from mobile doc tabs
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
@import '../../../../scss/styles.scss';
|
||||
|
||||
.doc-tabs {
|
||||
display: flex;
|
||||
|
||||
&__tabs {
|
||||
display: flex;
|
||||
gap: calc(var(--base) / 2);
|
||||
@@ -18,20 +20,14 @@
|
||||
&__tabs {
|
||||
padding: 0;
|
||||
margin-left: var(--gutter-h);
|
||||
|
||||
& > *:last-child {
|
||||
// CSS hack, give the illusion of right margin within the overflowing container
|
||||
// margin-right, padding-right, etc are tricky within overflowing flex-boxes
|
||||
&::after {
|
||||
content: '';
|
||||
padding-right: var(--gutter-h);
|
||||
height: 1px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@include small-break {
|
||||
&__tabs-container {
|
||||
margin-right: var(--gutter-h);
|
||||
}
|
||||
|
||||
&__tabs {
|
||||
gap: var(--gutter-h);
|
||||
}
|
||||
|
||||
@@ -17,20 +17,22 @@ export const DocumentTabs: React.FC<DocumentTabProps> = (props) => {
|
||||
if ((collection && isEditing) || global) {
|
||||
return (
|
||||
<div className={baseClass}>
|
||||
<ul className={`${baseClass}__tabs`}>
|
||||
{tabs?.map((Tab, index) => {
|
||||
return <DocumentTab {...props} {...Tab} key={`tab-${index}`} />
|
||||
})}
|
||||
{customViews?.map((CustomView, index) => {
|
||||
const { Tab, path } = CustomView
|
||||
<div className={`${baseClass}__tabs-container`}>
|
||||
<ul className={`${baseClass}__tabs`}>
|
||||
{tabs?.map((Tab, index) => {
|
||||
return <DocumentTab {...props} {...Tab} key={`tab-${index}`} />
|
||||
})}
|
||||
{customViews?.map((CustomView, index) => {
|
||||
const { Tab, path } = CustomView
|
||||
|
||||
if (typeof Tab === 'function') {
|
||||
return <Tab path={path} {...props} key={`tab-custom-${index}`} />
|
||||
}
|
||||
if (typeof Tab === 'function') {
|
||||
return <Tab path={path} {...props} key={`tab-custom-${index}`} />
|
||||
}
|
||||
|
||||
return <DocumentTab {...props} {...Tab} key={`tab-custom-${index}`} />
|
||||
})}
|
||||
</ul>
|
||||
return <DocumentTab {...props} {...Tab} key={`tab-custom-${index}`} />
|
||||
})}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user