Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit3c63c8c

Browse files
committed
fix: fix tabs styling
1 parent2354883 commit3c63c8c

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

‎site/src/components/Tabs/Tabs.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { type FC, type HTMLAttributes, createContext, useContext } from "react";
22
import{Link,typeLinkProps}from"react-router-dom";
33
import{cn}from"utils/cn";
44

5-
exportconstTAB_PADDING_Y=12;
5+
// Keeping this for now because of a workaround in WorkspaceBUildPageView
66
exportconstTAB_PADDING_X=16;
77

88
typeTabsContextValue={
@@ -13,11 +13,13 @@ const TabsContext = createContext<TabsContextValue | undefined>(undefined);
1313

1414
typeTabsProps=HTMLAttributes<HTMLDivElement>&TabsContextValue;
1515

16-
exportconstTabs:FC<TabsProps>=({ active, ...htmlProps})=>{
16+
exportconstTabs:FC<TabsProps>=({className,active, ...htmlProps})=>{
1717
return(
1818
<TabsContext.Providervalue={{ active}}>
1919
<div
20-
className="border-b border-solid border-border border-t-0 border-l-0 border-r-0"
20+
// Because the Tailwind preflight is not used, its necessary to set border style to solid and
21+
// reset all border widths to 0 https://tailwindcss.com/docs/border-width#using-without-preflight
22+
className={cn("border-0 border-b border-solid border-border",className)}
2123
{...htmlProps}
2224
/>
2325
</TabsContext.Provider>

‎site/src/pages/TemplatePage/TemplateLayout.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import type { AuthorizationRequest } from "api/typesGenerated";
33
import{ErrorAlert}from"components/Alert/ErrorAlert";
44
import{Loader}from"components/Loader/Loader";
55
import{Margins}from"components/Margins/Margins";
6-
import{TAB_PADDING_Y,TabLink,Tabs,TabsList}from"components/Tabs/Tabs";
6+
import{TabLink,Tabs,TabsList}from"components/Tabs/Tabs";
77
import{
88
typeFC,
99
typePropsWithChildren,
@@ -110,7 +110,7 @@ export const TemplateLayout: FC<PropsWithChildren> = ({
110110

111111
<Tabs
112112
active={activeTab}
113-
css={{marginBottom:40,marginTop:-TAB_PADDING_Y}}
113+
className="mb-10 -mt-3"
114114
>
115115
<Margins>
116116
<TabsList>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp