Skip to content

Commit

Permalink
feat(SingleLine): fixed SingleLine component
Browse files Browse the repository at this point in the history
  • Loading branch information
Kechicode committed Jan 8, 2025
1 parent 9c7b48b commit 4afc764
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 5 deletions.
2 changes: 2 additions & 0 deletions src/views/Home/Channel/SingleLine/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ const SingleLine = ({ items }: SingleLineProps) => {
}, [hash])

return (
// <div className={styles.container}>
<section className={styles.singleLine}>
{items.map((item) => (
<a
Expand All @@ -72,6 +73,7 @@ const SingleLine = ({ items }: SingleLineProps) => {
</a>
))}
</section>
// </div>
)
}

Expand Down
21 changes: 16 additions & 5 deletions src/views/Home/Channel/SingleLine/styles.module.css
Original file line number Diff line number Diff line change
@@ -1,15 +1,26 @@
/* 频道行样式 */
.singleLine {
@mixin border-bottom-grey;

position: relative;
.container {
position: fixed;
top: 65px;
z-index: var(--z-index-sticky-tabs);
}

.singleLine {
position: fixed;
top: 65px;
right: 0;
left: 0;
z-index: var(--z-index-sticky-tabs);
display: flex;
gap: var(--sp12);
align-items: center;
margin: 0 calc(var(--sp16) * -1);

/* margin: 0 calc(var(--sp16) * -1); */
overflow-x: auto; /* horizontal scroll */
white-space: nowrap;
border-bottom-color: var(--color-grey-hover);
background-color: var(--color-white);
border-bottom: 2px solid var(--color-grey-hover);
scrollbar-width: none; /* Firefox hide scrollbar */

&::-webkit-scrollbar {
Expand Down

0 comments on commit 4afc764

Please sign in to comment.