Skip to content

Commit

Permalink
[#1584] Fix active indicator tabs styles
Browse files Browse the repository at this point in the history
  • Loading branch information
ifirmawan committed Sep 14, 2023
1 parent 0675c52 commit 9f402fc
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
width: 400px;
padding: 20px;
:global(.ant-tabs) {
margin-top: 4px;
background-color: $primaryGrey;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ const CountryTransnationalFilter = ({

return (
<Tabs
type="card"
type="line"
className="country-filter-tab"
onChange={handleChangeLocationTab}
>
Expand Down
32 changes: 22 additions & 10 deletions frontend/src/styles/tabs.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
.ant-dropdown,
.ant-modal-root {
.ant-tabs:not(.ant-tabs-left) {
background-color: $primaryGrey;
box-shadow: 0px 0px 4px rgb(0 0 0 / 25%);
border-radius: 4px;
&.ant-tabs-top {
Expand All @@ -12,15 +11,15 @@
}
.ant-tabs-nav-list {
.ant-tabs-tab {
flex: 0 0 50%;
margin-left: 0;
display: flex;
padding: 16px 24px 12px 24px;
align-items: center;
gap: 8px;
border: none;
padding: 16px 24px;
border-top-left-radius: 4px;
border-top-right-radius: 4px;
border-bottom: 4px solid $primaryPurple3;
border-radius: 4px;
background-color: $primaryGrey;
margin-bottom: 8px;
&.ant-tabs-tab-active {
border-bottom: 4px solid $primaryPurple7;
.ant-tabs-tab-btn {
color: $primaryDarkBlue;
}
Expand All @@ -31,6 +30,19 @@
font-weight: 500;
color: $primaryDarkBlue;
}
&:focus {
border: 2px solid $primaryPurple7;
}
}
.ant-tabs-tab + .ant-tabs-tab {
margin-left: 16px;
}
.ant-tabs-ink-bar {
background: $primaryPurple7;
border-radius: 2px 2px 0px 0px;
&:focus {
background: transparent;
}
}
}
.ant-tabs-content-holder {
Expand All @@ -46,8 +58,8 @@
}
}
& > .ant-tabs-nav {
.ant-tabs-nav-list {
width: 100%;
.ant-tabs-ink-bar {
height: 4px;
}
}
}
Expand Down

0 comments on commit 9f402fc

Please sign in to comment.