Skip to content

Commit

Permalink
feat(ui): add ui-components package
Browse files Browse the repository at this point in the history
  • Loading branch information
avivkeller committed Jan 10, 2025
1 parent d4de2a6 commit 00943d5
Show file tree
Hide file tree
Showing 183 changed files with 1,309 additions and 1,539 deletions.
62 changes: 0 additions & 62 deletions apps/site/.storybook/main.ts

This file was deleted.

20 changes: 0 additions & 20 deletions apps/site/.storybook/preview-head.html

This file was deleted.

40 changes: 0 additions & 40 deletions apps/site/.storybook/preview.tsx

This file was deleted.

6 changes: 3 additions & 3 deletions apps/site/app/[locale]/error.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { ArrowRightIcon } from '@heroicons/react/24/solid';
import { useTranslations } from 'next-intl';
import type { FC } from 'react';

import Button from '@/components/Common/Button';
import WithButton from '@/components/withButton';
import GlowingBackdropLayout from '@/layouts/GlowingBackdrop';

const ErrorPage: FC<{ error: Error }> = () => {
Expand All @@ -19,10 +19,10 @@ const ErrorPage: FC<{ error: Error }> = () => {
<p className="-mt-4 max-w-sm text-center text-lg">
{t('layouts.error.internalServerError.description')}
</p>
<Button href="/">
<WithButton href="/">
{t('layouts.error.backToHome')}
<ArrowRightIcon />
</Button>
</WithButton>
</GlowingBackdropLayout>
);
};
Expand Down
2 changes: 1 addition & 1 deletion apps/site/app/[locale]/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { availableLocalesMap, defaultLocale } from '@/next.locales.mjs';
import { LocaleProvider } from '@/providers/localeProvider';
import { ThemeProvider } from '@/providers/themeProvider';

import '@/styles/index.css';
import '@node-core/ui-components/styles/index.css';

const fontClasses = classNames(IBM_PLEX_MONO.variable, OPEN_SANS.variable);

Expand Down
6 changes: 3 additions & 3 deletions apps/site/app/[locale]/not-found.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import Image from 'next/image';
import { useTranslations } from 'next-intl';
import type { FC } from 'react';

import Button from '@/components/Common/Button';
import WithButton from '@/components/withButton';
import GlowingBackdropLayout from '@/layouts/GlowingBackdrop';

const NotFoundPage: FC = () => {
Expand All @@ -30,10 +30,10 @@ const NotFoundPage: FC = () => {
<p className="-mt-4 max-w-sm text-center text-lg">
{t('layouts.error.notFound.description')}
</p>
<Button href="/">
<WithButton href="/">
{t('layouts.error.backToHome')}
<ArrowRightIcon />
</Button>
</WithButton>
</GlowingBackdropLayout>
);
};
Expand Down
6 changes: 3 additions & 3 deletions apps/site/app/global-error.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import { ArrowRightIcon } from '@heroicons/react/24/solid';
import type { FC } from 'react';

import Button from '@/components/Common/Button';
import WithButton from '@/components/withButton';
import BaseLayout from '@/layouts/Base';
import GlowingBackdropLayout from '@/layouts/GlowingBackdrop';

Expand All @@ -17,10 +17,10 @@ const GlobalErrorPage: FC<{ error: Error }> = () => (
<p className="-mt-4 max-w-sm text-center text-lg">
This page has thrown a non-recoverable error.
</p>
<Button href="/">
<WithButton href="/">
Back to Home
<ArrowRightIcon />
</Button>
</WithButton>
</GlowingBackdropLayout>
</BaseLayout>
</body>
Expand Down
53 changes: 0 additions & 53 deletions apps/site/components/Common/AvatarGroup/Avatar/index.tsx

This file was deleted.

21 changes: 0 additions & 21 deletions apps/site/components/Common/AvatarGroup/Overlay/index.stories.tsx

This file was deleted.

23 changes: 23 additions & 0 deletions apps/site/components/Common/BannerWithLink.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import { ArrowUpRightIcon } from '@heroicons/react/24/outline';
import type { BannerProps } from '@node-core/ui-components/Common/Banner';
import Banner from '@node-core/ui-components/Common/Banner';
import type { FC, PropsWithChildren } from 'react';

import Link from '@/components/Link';

type BannerWithLinkProps = BannerProps & {
link: string;
};

const BannerWithLink: FC<PropsWithChildren<BannerWithLinkProps>> = ({
type = 'default',
link,
children,
}) => (
<Banner type={type}>
{link ? <Link href={link}>{children}</Link> : children}
{link && <ArrowUpRightIcon />}
</Banner>
);

export default BannerWithLink;
2 changes: 1 addition & 1 deletion apps/site/components/Common/BlogPostCard/index.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import Preview from '@node-core/ui-components/Common/Preview';
import { useTranslations } from 'next-intl';
import type { FC } from 'react';

import FormattedTime from '@/components/Common/FormattedTime';
import Preview from '@/components/Common/Preview';
import Link from '@/components/Link';
import WithAvatarGroup from '@/components/withAvatarGroup';
import { mapBlogCategoryToPreviewType } from '@/util/blogUtils';
Expand Down
70 changes: 0 additions & 70 deletions apps/site/components/Common/Button/index.tsx

This file was deleted.

Loading

0 comments on commit 00943d5

Please sign in to comment.