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