Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ export default {
children: <TabsContent />,
defaultValue: 'mjs',
tabs: [
{ key: 'mjs', label: 'MJS' },
{ key: 'cjs', label: 'CJS' },
{ key: 'mjs', label: 'Example', secondaryLabel: 'MJS' },
{ key: 'cjs', label: 'Example', secondaryLabel: 'CJS' },
Comment on lines -70 to +71
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should have tabs with and without secondary labels

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

secondaryLabel doesn’t feel like the right naming. Since the Tab component is used in many places, it could lead to misuse. IMO using the name extension directly would be clearer and more self-explanatory

],
},
} as Meta;
13 changes: 11 additions & 2 deletions packages/ui-components/src/Common/Tabs/index.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,15 @@
dark:text-neutral-200;

.tabSecondaryLabel {
@apply pl-1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The secondary label was added for the search box module we used previously and is no longer a feature in use. Since we’ll only be using it in the code box, adding just the dark mode variant will be better

@apply ml-1
rounded
border
border-neutral-500
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The border and text colors don't match Figma and aren't sufficient for the minimum contrast ratio;

image

px-1
py-0.5
text-xs
text-neutral-500
dark:border-neutral-800
dark:text-neutral-800;
}

Expand All @@ -35,7 +42,9 @@
dark:text-green-400;

.tabSecondaryLabel {
@apply text-green-800
@apply border-green-800
text-green-800
dark:border-green-600
dark:text-green-600;
}
}
Expand Down
Loading