Skip to content

Commit

Permalink
Merge pull request #242 from PrestaShopCorp/improve_tab-nav
Browse files Browse the repository at this point in the history
feat: improve tab nav responsivity
  • Loading branch information
mattgoud authored Nov 8, 2023
2 parents 9b814a1 + 594de12 commit c3af2d4
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ import type { ExtractPropTypes } from 'vue'
import type TabNavigationTitle from './tab-navigation-title.vue'

export const tabNavigationTitleProps = buildProps({
position: {
type: Number,
required: true,
},
disabled: {
type: Boolean,
required: false,
default: false,
},
position: {
type: Number,
required: true,
},
} as const)

export type TabNavigationTitleProps = ExtractPropTypes<
Expand Down
2 changes: 1 addition & 1 deletion packages/theme/src/tab-navigation-group-titles.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
.puik-tab-navigation__group-titles {
@apply flex min-h-[48px] overflow-x-auto;
@apply flex flex-col min-h-[48px] sm:flex-row sm:flex-wrap;
}
22 changes: 6 additions & 16 deletions packages/theme/src/tab-navigation-title.scss
Original file line number Diff line number Diff line change
@@ -1,29 +1,19 @@
@use './common/typography.scss';

.puik-tab-navigation__title {
@apply relative min-h-full p-2 flex items-center cursor-pointer puik-body-default-bold;
flex: 0 1 135px;
gap: 8px;
white-space: nowrap;
border-bottom: 1px solid #dce1e3;
@apply relative p-2 flex gap-2 whitespace-nowrap border-b border-b-primary-400 items-center cursor-pointer puik-body-default-bold sm:w-[135px];

&:focus:not(:hover) {
@apply bg-primary-400;
outline: none;
@apply bg-primary-400 outline-none;
}

&:hover {
@apply bg-primary-300;
}

&--selected {
&::before {
@apply bg-black;
content: '';
display: block;
position: absolute;
bottom: 0;
left: 0;
width: 100%;
height: 3px;
border-radius: 4px 4px 0 0;
@apply bg-primary content-[''] block absolute bottom-0 left-0 w-full h-[3px] rounded-t-[4px];
}
}
&--disabled {
Expand Down

0 comments on commit c3af2d4

Please sign in to comment.