Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,6 @@ const StyledTabs = styled(Tabs)<{
$showHeader?: boolean;
$animationStyle: AnimationStyleType;
$isDestroyPane?: boolean;
$placement?: string;
}>`
&.ant-tabs {
height: 100%;
Expand All @@ -167,15 +166,15 @@ const StyledTabs = styled(Tabs)<{
height: 100%;
}

/* Keep AntD flex nav so overflow "..." stays on the right. */
.ant-tabs-nav {
display: ${(props) => (props.$showHeader ? "block" : "none")};
${(props) => !props.$showHeader && `display: none;`}
margin: 0px;
}

.ant-tabs-tab + .ant-tabs-tab {
${(props) => (props.$placement === "left" || props.$placement === "right")
? `margin: 20px 0 0 0;`
: `margin: 0 0 0 20px;`}
/* tabBarGutter also margins the more button; keep "..." flush like AntD default. */
.ant-tabs-nav-more {
margin-inline-start: 0 !important;
}

${(props) => props.$style && getStyle(props.$style, props.$headerStyle, props.$bodyStyle)}
Expand Down Expand Up @@ -315,7 +314,6 @@ const TabbedContainer = (props: TabbedContainerProps) => {
$bodyStyle={bodyStyle}
$showHeader={showHeader}
$isDestroyPane={tabBehavior === "destroy"}
$placement={props.placement}
onChange={(key) => {
if (key !== props.selectedTabKey.value) {
props.selectedTabKey.onChange(key);
Expand Down Expand Up @@ -384,7 +382,10 @@ export const TabbedContainerBaseComp = (function () {
<Section name={sectionNames.layout}>
{children.placement.propertyView({ label: trans("tabbedContainer.placement"), radioButton: true })}
{children.tabsCentered.propertyView({ label: trans("tabbedContainer.tabsCentered")})}
{ children.tabsGutter.propertyView({ label: trans("tabbedContainer.gutter"), tooltip : trans("tabbedContainer.gutterTooltip") })}
{children.tabsGutter.propertyView({
label: trans("tabbedContainer.gutter"),
tooltip: trans("tabbedContainer.gutterTooltip"),
})}
{children.horizontalGridCells.propertyView({
label: trans('prop.horizontalGridCells'),
})}
Expand Down
2 changes: 1 addition & 1 deletion client/packages/lowcoder/src/i18n/locales/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3193,7 +3193,7 @@ export const en = {
"placement" : "Tabs Placement",
"showTabs": "Show Tabs",
"gutter" : "Gap",
"gutterTooltip" : "The distance between tabs in px",
"gutterTooltip" : "Gap between tabs in px (Ant Design tabBarGutter). Default is 32.",
"tabsCentered" : "Centered Tabs",
"destroyInactiveTab": "Destroy Inactive TabPane",
"tabBehavior": "Tab Behavior",
Expand Down
Loading