Skip to content

Commit d554c8f

Browse files
committed
Fix tabs style and adjust text contrast
1 parent 5aba47e commit d554c8f

File tree

6 files changed

+29
-24
lines changed

6 files changed

+29
-24
lines changed

public/assets/github-white-800.svg

Lines changed: 1 addition & 1 deletion
Loading

public/scroll-docs-white-800.svg

Lines changed: 16 additions & 16 deletions
Loading

src/components/Tabs/Tabs.module.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
button.primary,
1313
button.contentTabPrimary {
14-
@apply text-link border-link border-0 border-b-4 border-solid;
14+
@apply !text-link border-link border-0 border-b-4 border-solid;
1515
}
1616

1717
button.secondary {

src/components/Tabs/Tabs.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ export function Tabs({ sharedStore, ...slots }: Props) {
6565

6666
return (
6767
<div class={styles.container}>
68-
<div role="tablist" class={styles.tablist} onKeyDown={moveFocus}>
68+
<div role="tablist" class={clsx(styles.tablist, 'dark:border-white-800')} onKeyDown={moveFocus}>
6969
{tabs.map(([key, content]) => (
7070
<button
7171
ref={(el) => (tabButtonRefs.current[key] = el)}
@@ -79,7 +79,11 @@ export function Tabs({ sharedStore, ...slots }: Props) {
7979
data-astro-tab
8080
id={key}
8181
key={key}
82-
class={clsx(curr === getBaseKeyFromTab(key) ? styles.primary : styles.secondary, styles.tab)}
82+
class={clsx(
83+
curr === getBaseKeyFromTab(key) ? styles.primary : styles.secondary,
84+
styles.tab,
85+
"dark:text-white-800"
86+
)}
8387
>
8488
{content}
8589
</button>

0 commit comments

Comments
 (0)