Skip to content

Commit

Permalink
add shared-components to storybook
Browse files Browse the repository at this point in the history
  • Loading branch information
ASafaeirad committed Aug 13, 2024
1 parent eaba676 commit a17386e
Show file tree
Hide file tree
Showing 16 changed files with 9 additions and 14 deletions.
5 changes: 1 addition & 4 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
import { StorybookConfig } from '@storybook/react-vite';
const config: StorybookConfig = {
stories: [
'../libs/design/**/*.stories.tsx',
'../libs/pages/**/*.stories.tsx',
],
stories: ['../libs/**/*.stories.tsx'],
addons: [
'@storybook/addon-essentials',
'storybook-addon-apollo-client',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { DashboardTitle } from '../DashboardTitle';
import { CollapsibleDashboardCard } from './CollapsibleDashboardCard';

export default {
title: 'CollapsibleDashboardCard',
title: 'design/CollapsibleDashboardCard',
component: CollapsibleDashboardCard,
} as Meta<typeof CollapsibleDashboardCard>;

Expand Down
1 change: 0 additions & 1 deletion libs/design/DashboardCard/DashboardCard.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { DashboardTitle } from '../DashboardTitle';
import { DashboardCard } from './DashboardCard';

export default {
title: 'DashboardCard',
component: DashboardCard,
} as Meta<typeof DashboardCard>;

Expand Down
1 change: 0 additions & 1 deletion libs/design/NavLink/NavLink.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import { NavLink } from './NavLink';

export default {
component: NavLink,
title: 'NavLink',
render(args) {
return (
<Stack sx={{ width: 300 }}>
Expand Down
2 changes: 1 addition & 1 deletion libs/design/NavLink/NavLinks.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { NavLinks } from './NavLinks';

export default {
component: NavLinks,
title: 'NavLinks',
title: 'design/NavLinks',
render: args => (
<Stack sx={{ width: 300 }}>
<NavLinks {...args} />
Expand Down
3 changes: 1 addition & 2 deletions libs/pages/Households/HouseholdDetail/HouseholdDetail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,13 @@ import {
import { ArrowUpIcon, CheckIcon, EditIcon, TrashIcon } from '@camp/icons';
import { errorMessages, messages } from '@camp/messages';
import { AppRoute, useNavigate, useParams } from '@camp/router';
import { InformationBadge, SeverityBadge } from '@camp/shared-components';
import { tid } from '@camp/test';
import { isNull } from '@fullstacksjs/toolbox';
import { Button, Flex, Title } from '@mantine/core';
import { useBoolean } from 'ahooks';
import { useForm } from 'react-hook-form';

import { InformationBadge } from '../../+components/InformationBadge';
import { SeverityBadge } from '../../+components/SeverityBadge';
import { openDeleteHouseholdModal } from '../DeleteHouseholdModal';
import { householdDetailIds as ids } from './HouseholdDetail.ids';
import { HouseholderDetail } from './HouseholderDetail';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import { messages } from '@camp/messages';
import { InformationBadge } from '@camp/shared-components';
import { Group, Title } from '@mantine/core';

import { InformationBadge } from '../../../+components/InformationBadge';

const t = messages.member;

interface Props {
Expand Down
3 changes: 1 addition & 2 deletions libs/pages/Households/HouseholdList/HouseholdList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,14 @@ import { DashboardCard, DashboardTitle, showNotification } from '@camp/design';
import { householdColumnHelper } from '@camp/domain';
import { errorMessages, messages } from '@camp/messages';
import { AppRoute } from '@camp/router';
import { InformationBadge, SeverityBadge } from '@camp/shared-components';
import { tid } from '@camp/test';
import { isEmpty } from '@fullstacksjs/toolbox';
import { Group } from '@mantine/core';
import type { PaginationState, SortingState } from '@tanstack/react-table';
import { getCoreRowModel, useReactTable } from '@tanstack/react-table';
import { useState } from 'react';

import { InformationBadge } from '../../+components/InformationBadge';
import { SeverityBadge } from '../../+components/SeverityBadge';
import { CreateHouseholdButton } from '../CreateHousehold';
import { HouseholdActionButton } from '../HouseholdActionButton';
import { HouseholdEmptyState } from '../HouseholdEmptyState';
Expand Down
2 changes: 2 additions & 0 deletions libs/shared-components/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export * from './InformationBadge';
export * from './SeverityBadge';
1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"@camp/messages": ["./app/messages.ts"],
"@camp/pages/*": ["./libs/pages/*"],
"@camp/router": ["./libs/router/index.ts"],
"@camp/shared-components": ["./libs/shared-components/index.ts"],
"@camp/test": ["./libs/test/index.ts"],
"@camp/zod-addons": ["./libs/zod-addons/index.ts"],
"@camp/zod-addons/monkey-patch": ["./libs/zod-addons/monkeyPatchZod.ts"]
Expand Down

0 comments on commit a17386e

Please sign in to comment.