Skip to content

Commit

Permalink
Merge pull request #4 from rangle/fix-profile-bugs
Browse files Browse the repository at this point in the history
fix: rename profile
  • Loading branch information
stephanie56 committed Apr 9, 2024
2 parents 8c74426 + 16f6b9e commit dacb138
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 14 deletions.
6 changes: 3 additions & 3 deletions components/ui/profiles/profiles.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import React from "react";
import { Profile, ProfileProps } from "../profile/profile";
import { SitterProfile, SitterProfileProps } from "../sitter";

export interface ProfilesProps {
profiles: ProfileProps[] | undefined;
profiles: SitterProfileProps[] | undefined;
}

export const Profiles = ({ profiles, ...props }: ProfilesProps) => {
Expand All @@ -18,7 +18,7 @@ export const Profiles = ({ profiles, ...props }: ProfilesProps) => {
profiles.map((profile, index) => {
return (
<div key={index}>
<Profile {...profile} />
<SitterProfile {...profile} />
</div>
);
})}
Expand Down
1 change: 1 addition & 0 deletions components/ui/sitter/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './sitter';
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import type { Meta, StoryObj } from '@storybook/react';
import { INITIAL_VIEWPORTS } from '@storybook/addon-viewport';
import { Profile } from './profile';
import { SitterProfile } from './sitter';


export default {
title: 'Modules/Profile',
component: Profile,
title: 'Modules/Sitter Profile',
component: SitterProfile,
parameters: {
// https://storybookjs.github.io/addon-designs/?path=/story/docs-quick-start--page
design: {
Expand All @@ -22,7 +22,7 @@ export default {
},
};

type Story = StoryObj<typeof Profile>;
type Story = StoryObj<typeof SitterProfile>;

export const Primary: Story = {};

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { expect } from '@storybook/jest';
import type { Meta, StoryObj } from '@storybook/react';
import { Profile } from './profile';
import { SitterProfile } from './sitter';
import { within, userEvent } from '@storybook/testing-library';

export default {
title: 'Interactive/Profile',
component: Profile,
component: SitterProfile,
args: {
fullName: "Jane Doe",
location: "3 miles away",
Expand All @@ -14,7 +14,7 @@ export default {
},
};

type Story = StoryObj<typeof Profile>;
type Story = StoryObj<typeof SitterProfile>;

export const SetProfileAvailable: Story = {
play: async ({ args, canvasElement }) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { Badge } from "../badge/badge";
import { Button } from "../button/button";
import { MapPin } from 'lucide-react';

export interface ProfileProps {
export interface SitterProfileProps {
id: string;
profileImg?: string;
fullName: string;
Expand All @@ -25,15 +25,15 @@ export interface ProfileProps {
/**
* the component description will be used in the storybook docs
*/
export const Profile = ({
export const SitterProfile = ({
profileImg,
fullName,
location,
description,
editMode,
available,
...props
}: ProfileProps) => {
}: SitterProfileProps) => {

const [availability, setAvailability] = useState(available);

Expand Down
2 changes: 1 addition & 1 deletion generator/componentTemplate/stories.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export default {
// https://storybookjs.github.io/addon-designs/?path=/story/docs-quick-start--page
design: {
type: "figma",
url: "", // Url to the component's figma file/frame/prototype.
url: "https://www.figma.com/file/LKQ4FJ4bTnCSjedbRpk931/Sample-File", // Url to the component's figma file/frame/prototype.
},
},
tags: ['autodocs'],
Expand Down

0 comments on commit dacb138

Please sign in to comment.