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

Align tab style with product #1023

Merged
merged 1 commit into from
Mar 19, 2024
Merged
Show file tree
Hide file tree
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
10 changes: 9 additions & 1 deletion packages/gatsby-theme-newrelic/src/components/Tabs/Bar.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,13 +95,21 @@ const Bar = ({ children, className }) => {
className={className}
role="tablist"
css={css`
border: none;
display: flex;
width: 100%;
overflow: auto;
position: relative;
@media screen and (max-width: ${mobileBreakpoint}) {
display: none;
}
&:before {
border-bottom: 1px solid #cdd3d5;
bottom: 251px;
content: '';
left: 0;
position: absolute;
right: 0;
}
`}
>
{React.Children.map(children, (child, index) =>
Expand Down
20 changes: 4 additions & 16 deletions packages/gatsby-theme-newrelic/src/components/Tabs/BarItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,9 @@ const BarItem = ({ className, index, children, id, disabled }) => {
css={css`
background: none;
border: none;
border-bottom: #afe2e3 solid 1px;
border-top: var(--primary-background-color) solid 1px;
color: var(--primary-text-color);
cursor: pointer;
flex-grow: 1;
font-weight: bold;
padding: 0.75em 0.5em 0.75em 1em;
padding: 0.5em;
text-align: left;
transition: 500ms background ease-in;
user-select: none;
Expand All @@ -49,17 +45,9 @@ const BarItem = ({ className, index, children, id, disabled }) => {
}

&.isSelected {
border-top-left-radius: 4px;
border-top-right-radius: 4px;
background: var(--secondary-background-color);

border: var(--border-color) solid 1px;
border: #afe2e3 solid 1px;
border-bottom: var(--secondary-background-color) solid 1px;

.dark-mode & {
border-bottom: var(--secondary-background-color) solid 1px;
}
border-bottom: #0c74df solid 2px;
font-weight: 600;
z-index: 1;
}
`}
className={cx(
Expand Down
2 changes: 0 additions & 2 deletions packages/gatsby-theme-newrelic/src/components/Tabs/Page.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,6 @@ const Page = ({ index, children, id, className }) => {
aria-labelledby={id}
ref={tabpanel}
css={css`
opacity: 1;
background: var(--secondary-background-color);
top: 1em;
left: 1em;

Expand Down
5 changes: 0 additions & 5 deletions packages/gatsby-theme-newrelic/src/components/Tabs/Pages.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,6 @@ const Pages = ({ children }) => {
css={css`
padding: 1em;
margin-bottom: 1em;
background: var(--secondary-background-color);
border: #afe2e3 solid 1px;
border-top: none;
border-bottom-left-radius: 4px;
border-bottom-right-radius: 4px;
overflow: hidden;
position: relative;

Expand Down
Loading