Skip to content
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
8 changes: 8 additions & 0 deletions apps/site/components/Common/Searchbox/Footer/index.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,11 @@
@apply size-4;
}
}

.poweredByWrapper {
@apply ml-0
flex
items-center
justify-end
lg:ml-8;
}
2 changes: 1 addition & 1 deletion apps/site/components/Common/Searchbox/Footer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export const Footer = () => {
</span>
</div>
</div>
<div>
<div className={styles.poweredByWrapper}>
<a
href="https://www.orama.com/?utm_source=nodejs.org&utm_medium=powered-by"
target="_blank"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ authors: flaviocopes, MylesBorins, LaRuaNa, ahmadawais, ovflowd, marksist300
As you try to understand the Node.js event loop, one important part of it is `process.nextTick()`.
Every time the runtime calls back into JavaScript for an event, we call it a tick.

When we pass a function to `process.nextTick()`, we instruct the engine to invoke this function immediately after the current operation completes, before moving to the next phase in the event loop:
When we pass a function to `process.nextTick()`, we schedule it to run immediately after the current call stack completes, before the event loop continues and before any other queued tasks or phases are processed:

```js
process.nextTick(() => {
Expand Down
9 changes: 9 additions & 0 deletions packages/ui-components/src/Common/CodeTabs/index.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,15 @@ const TabsContent: FC = () => (

export const Default: Story = {};

export const WithExtension: Story = {
args: {
tabs: [
{ key: 'mjs', label: 'Example', extension: 'MJS' },
{ key: 'cjs', label: 'Example', extension: 'CJS' },
],
},
};

export default {
component: CodeTabs,
args: {
Expand Down
17 changes: 17 additions & 0 deletions packages/ui-components/src/Common/Tabs/index.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,18 @@
text-neutral-800
dark:text-neutral-200;

.tabExtension {
@apply ml-1
rounded-xs
border
border-neutral-200
px-1
py-0.5
text-xs
font-normal
text-neutral-200;
}

.tabSecondaryLabel {
@apply pl-1
text-neutral-500
Expand All @@ -34,6 +46,11 @@
dark:border-b-green-400
dark:text-green-400;

.tabExtension {
@apply border-green-400
text-green-400;
}

.tabSecondaryLabel {
@apply text-green-800
dark:text-green-600;
Expand Down
4 changes: 4 additions & 0 deletions packages/ui-components/src/Common/Tabs/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ type Tab = {
label: string;
secondaryLabel?: string;
value?: string;
extension?: string;
};

type TabsProps = TabsPrimitive.TabsProps & {
Expand Down Expand Up @@ -37,6 +38,9 @@ const Tabs: FC<PropsWithChildren<TabsProps>> = ({
className={classNames(styles.tabsTrigger, triggerClassName)}
>
{tab.label}
{tab.extension && (
<span className={styles.tabExtension}>{tab.extension}</span>
)}
{tab.secondaryLabel ? (
<span className={styles.tabSecondaryLabel}>
{tab.secondaryLabel}
Expand Down
Loading