-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
412 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import React from "react"; | ||
|
||
const Plans = () => { | ||
return <div></div>; | ||
}; | ||
|
||
export default Plans; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
105 changes: 105 additions & 0 deletions
105
packages/luna/src/components/TutorCard/TutorCardV1.stories.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
import { Meta, StoryObj } from "@storybook/react"; | ||
import { TutorCardV1 } from "@/components/TutorCard"; | ||
import { CardProps } from "@/components/TutorCard/types"; | ||
import { faker } from "@faker-js/faker/locale/ar"; | ||
import React from "react"; | ||
import { range } from "lodash"; | ||
|
||
type Story = StoryObj<CardProps>; | ||
|
||
const meta: Meta<CardProps> = { | ||
title: "TutorCardV1", | ||
component: TutorCardV1, | ||
decorators: [ | ||
(Story) => ( | ||
<div style={{ width: "568px" }}> | ||
<Story /> | ||
</div> | ||
), | ||
], | ||
}; | ||
|
||
const makeTopics = (count: number, wordLength?: number | null) => | ||
range(count).map(() => { | ||
return faker.word.sample({ length: wordLength || { min: 5, max: 15 } }); | ||
}); | ||
|
||
export const TutorWithoutName: Story = { | ||
args: { | ||
id: faker.number.int(), | ||
name: null, | ||
about: faker.lorem.paragraphs(3), | ||
studentCount: faker.number.int({ min: 10, max: 1_000 }), | ||
lessonCount: faker.number.int({ min: 10, max: 500 }), | ||
rating: faker.number.int({ min: 0, max: 5 }), | ||
imageUrl: faker.image.urlPicsumPhotos({ width: 1_000, height: 1_000 }), | ||
topics: makeTopics(12), | ||
}, | ||
}; | ||
|
||
export const TutorWithoutImage: Story = { | ||
args: { | ||
id: faker.number.int(), | ||
name: null, | ||
about: faker.lorem.paragraphs(3), | ||
studentCount: faker.number.int({ min: 10, max: 1_000 }), | ||
lessonCount: faker.number.int({ min: 10, max: 500 }), | ||
rating: faker.number.int({ min: 0, max: 5 }), | ||
imageUrl: null, | ||
topics: makeTopics(12), | ||
}, | ||
}; | ||
|
||
export const TutorWithStats: Story = { | ||
args: { | ||
id: faker.number.int(), | ||
name: faker.person.fullName(), | ||
about: faker.lorem.paragraphs(3), | ||
studentCount: faker.number.int({ min: 10, max: 1_000 }), | ||
lessonCount: faker.number.int({ min: 10, max: 500 }), | ||
rating: faker.number.int({ min: 0, max: 5 }), | ||
imageUrl: faker.image.urlPicsumPhotos({ width: 1_000, height: 1_000 }), | ||
topics: makeTopics(12), | ||
}, | ||
}; | ||
|
||
export const TutorWithHighStats: Story = { | ||
args: { | ||
id: faker.number.int(), | ||
name: faker.person.fullName(), | ||
about: faker.lorem.paragraphs(3), | ||
studentCount: faker.number.int({ min: 1_000, max: 10_000 }), | ||
lessonCount: faker.number.int({ min: 1_000, max: 10_000 }), | ||
rating: faker.number.int({ min: 0, max: 5 }), | ||
imageUrl: faker.image.urlPicsumPhotos({ width: 1_000, height: 1_000 }), | ||
topics: makeTopics(12, 10), | ||
}, | ||
}; | ||
|
||
export const TutorWithoutStats: Story = { | ||
args: { | ||
id: faker.number.int(), | ||
name: faker.person.fullName(), | ||
about: faker.lorem.paragraphs(3), | ||
studentCount: 0, | ||
lessonCount: 0, | ||
rating: 0, | ||
imageUrl: faker.image.urlPicsumPhotos({ width: 1_000, height: 1_000 }), | ||
topics: makeTopics(12), | ||
}, | ||
}; | ||
|
||
export const TutorWithoutRating: Story = { | ||
args: { | ||
id: faker.number.int(), | ||
name: faker.person.fullName(), | ||
about: faker.lorem.paragraphs(3), | ||
studentCount: faker.number.int({ min: 1, max: 200 }), | ||
lessonCount: faker.number.int({ min: 1, max: 200 }), | ||
rating: 0, | ||
imageUrl: faker.image.urlPicsumPhotos({ width: 1_000, height: 1_000 }), | ||
topics: makeTopics(12), | ||
}, | ||
}; | ||
|
||
export default meta; |
Oops, something went wrong.