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

chore(compass-components): only put the border on selected themed tabs COMPASS-8025 #5953

Merged
merged 1 commit into from
Jun 20, 2024
Merged
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 @@ -37,7 +37,7 @@ const tabStyles = css({
overflow: 'hidden',

// leave space so the active and other tabs line up
borderTop: '4px solid transparent',
paddingTop: spacing[100],

backgroundColor: 'var(--workspace-tab-background-color)',
color: 'var(--workspace-tab-color)',
Expand Down Expand Up @@ -110,14 +110,18 @@ const tabDarkThemeStyles = css({
const selectedTabStyles = css({
color: 'var(--workspace-tab-selected-color)',
backgroundColor: 'var(--workspace-tab-selected-background-color)',
borderTopColor: 'var(--workspace-tab-selected-border-color)',
boxShadow: 'inset -1px 0 0 0 var(--workspace-tab-border-color)',

'&:hover': {
cursor: 'default',
},
});

const selectedThemedTabStyles = css({
borderTop: `${spacing[100]}px solid var(--workspace-tab-selected-border-color)`,
paddingTop: 0,
});

const draggingTabStyles = css({
cursor: 'grabbing !important',
});
Expand Down Expand Up @@ -240,6 +244,7 @@ function Tab({
tabStyles,
themeClass,
isSelected && selectedTabStyles,
isSelected && tabTheme && selectedThemedTabStyles,
isDragging && draggingTabStyles,
subtitle && animatedSubtitleStyles
)}
Expand Down
Loading