Skip to content

Commit

Permalink
feat: powered by novu
Browse files Browse the repository at this point in the history
  • Loading branch information
BiswaViraj committed Sep 30, 2024
1 parent b771d69 commit 1295973
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions packages/js/src/ui/components/elements/Root.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,23 @@
import { splitProps } from 'solid-js';
import { Show, splitProps } from 'solid-js';
import { JSX } from 'solid-js/jsx-runtime';
import { useAppearance } from '../../context';
import { useAppearance, useInboxContext } from '../../context';
import { cn, useStyle } from '../../helpers';

type RootProps = JSX.IntrinsicElements['div'];
export const Root = (props: RootProps) => {
const [_, rest] = splitProps(props, ['class']);
const { id } = useAppearance();
const style = useStyle();
const { hideBranding } = useInboxContext();

return (
<div id={`novu-root-${id()}`} class={(style('root'), cn('novu', id(), 'nt-text-foreground nt-h-full'))} {...rest} />
<>
<Show when={!hideBranding()}>{new Comment('Powered by Novu')}</Show>
<div
id={`novu-root-${id()}`}
class={(style('root'), cn('novu', id(), 'nt-text-foreground nt-h-full'))}
{...rest}
/>
</>
);
};

0 comments on commit 1295973

Please sign in to comment.