Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improvement/tabs display #737

Merged
merged 7 commits into from
Jun 24, 2024
11 changes: 7 additions & 4 deletions src/lib/components/tabsv2/StyledTabs.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import styled from 'styled-components';

import { getThemePropSelector } from '../../utils';
import { spacing } from '../../spacing';

export const TabBar = styled.div`
Expand All @@ -24,7 +22,7 @@ export const TabItem = styled.div<{
&:focus-visible {
outline: 0;
position: relative;
border: ${spacing.r1} dashed ${getThemePropSelector('selectedActive')};
border: ${spacing.r1} dashed ${(props) => props.theme.selectedActive};
}

&:focus-within {
Expand Down Expand Up @@ -63,6 +61,7 @@ export const TabsContainer = styled.div<{
separatorColor: string;
}>`
height: 100%;
width: 100%;
display: flex;
flex-direction: column;
background-color: ${(props) =>
Expand All @@ -88,7 +87,11 @@ export const TabsContainer = styled.div<{
export const TabContent = styled.div<{ tabContentColor?: string }>`
margin: 0;
padding: 0;
flex: 1;
display: block;
width: 100%;
height: 100%;
box-sizing: border-box;
overflow: auto;
background-color: ${(props) =>
props.tabContentColor || props.theme.backgroundLevel4};
`;
Expand Down
1 change: 1 addition & 0 deletions src/lib/components/tabsv2/Tabsv2.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ function Tabs({
return (
<TabsContext.Provider value={true}>
<TabsContainer
style={{ containerType: 'size' }}
className={['sc-tabs', className].join(' ')}
tabLineColor={tabLineColor}
separatorColor={separatorColor}
Expand Down
Loading