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
5 changes: 3 additions & 2 deletions apps/storybook-react/.storybook/main.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
import type { StorybookConfig } from '@storybook/react-vite';
import path, { join, dirname } from 'path';
import { fileURLToPath } from 'url';

/**
* This function is used to resolve the absolute path of a package.
* It is needed in projects that are set up within a monorepo.
*
* @param value
*/
function getAbsolutePath(value: string): any {
return dirname(require.resolve(join(value, 'package.json')));
function getAbsolutePath(value: string): string {
return value;
}
Comment on lines +3 to 13
Copy link
Contributor

Choose a reason for hiding this comment

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

What is the reason for this change?


// Check if we're running in test mode (Vitest)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export const TWCLASSMAP_AVATARBASE_SIZE_BORDERRADIUSS_SQUARE: Record<
AvatarBaseSize,
string
> = {
[AvatarBaseSize.Xs]: 'rounded-sm', // 4px
[AvatarBaseSize.Xs]: 'rounded-[5px]', // 5px
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there any reason why we can't stay within the tailwind system? Is this the only place we should be using a 5px border radius?

[AvatarBaseSize.Sm]: 'rounded-md', // 6px
[AvatarBaseSize.Md]: 'rounded-lg', // 8px
[AvatarBaseSize.Lg]: 'rounded-[10px]', // 10px (No tailwind class for this)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export const TWCLASSMAP_AVATARBASE_SIZE_BORDERRADIUSS_SQUARE: Record<
AvatarBaseSize,
string
> = {
[AvatarBaseSize.Xs]: 'rounded-sm', // 4px
[AvatarBaseSize.Xs]: 'rounded-[5px]', // 5px
[AvatarBaseSize.Sm]: 'rounded-md', // 6px
[AvatarBaseSize.Md]: 'rounded-lg', // 8px
[AvatarBaseSize.Lg]: 'rounded-[10px]', // 10px (No tailwind class for this)
Expand Down
Loading