Skip to content

Commit

Permalink
Merge pull request #181 from Studio-Yandex-Practicum/enhancement-180-…
Browse files Browse the repository at this point in the history
…add-storybooks-to-reviewsBlock

#180-enhancement-add-storybooks-to-reviewsBlock
  • Loading branch information
JuliaAvramenko authored Jan 11, 2024
2 parents de27647 + aa83b78 commit 8c67446
Show file tree
Hide file tree
Showing 6 changed files with 54 additions and 4 deletions.
26 changes: 26 additions & 0 deletions src/entities/CardReview/ui/CardReview/CardReview.stories.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import type { Meta, StoryObj } from '@storybook/react'
import CardReview from './CardReview'

const meta = {
title: 'entities/CardReview',
component: CardReview,
parameters: {
layout: 'centered'
},
tags: ['autodocs']
} satisfies Meta<typeof CardReview>

export default meta
type Story = StoryObj<typeof meta>

export const Default: Story = {
args: {
review: {
id: 1,
name: 'Рейтинг нашего магазина',
score: '4.3',
text: 'Мы очень ним гордимся, это результат упорного труда в течении длительного времени и сейчас наша команда ежедневно работает над улучшением сервиса.',
date: ''
}
}
}
2 changes: 1 addition & 1 deletion src/shared/ui/ButtonDots/ButtonDots.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type { Meta, StoryObj } from '@storybook/react'
import ButtonDots from './ButtonDots'

const meta = {
title: 'ButtonDots',
title: 'shared/ButtonDots',
component: ButtonDots,
parameters: {
layout: 'centered'
Expand Down
2 changes: 1 addition & 1 deletion src/shared/ui/Heading/Heading.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type { Meta, StoryObj } from '@storybook/react'
import Heading, { HeadingType } from './Heading'

const meta = {
title: 'Heading',
title: 'shared/Heading',
component: Heading,
parameters: {
layout: 'centered'
Expand Down
2 changes: 1 addition & 1 deletion src/shared/ui/Paragraph/Paragraph.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type { Meta, StoryObj } from '@storybook/react'
import Paragraph, { ParagraphTheme } from './Paragraph'

const meta = {
title: 'Paragraph',
title: 'shared/Paragraph',
component: Paragraph,
parameters: {
layout: 'centered'
Expand Down
2 changes: 1 addition & 1 deletion src/shared/ui/Subheading/Subheading.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type { Meta, StoryObj } from '@storybook/react'
import Subheading from './Subheading'

const meta = {
title: 'Subheading',
title: 'shared/Subheading',
component: Subheading,
parameters: {
layout: 'centered'
Expand Down
24 changes: 24 additions & 0 deletions src/widgets/ReviewsBlock/ui/ReviewsBlock/ReviewsBlock.stories.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import type { Meta, StoryObj } from '@storybook/react'
import ReviewsBlock from './ReviewsBlock'
import { reviewsData } from '@/mockData/reviews.Data'
import { LINK_REVIEWS_ALL, TEXT_CUSTOMERS_ABOUT_US } from '@/shared/constants/constants'

const meta = {
title: 'widgets/ReviewsBlock',
component: ReviewsBlock,
parameters: {
layout: 'centered'
},
tags: ['autodocs']
} satisfies Meta<typeof ReviewsBlock>

export default meta
type Story = StoryObj<typeof meta>

export const Default: Story = {
args: {
title: TEXT_CUSTOMERS_ABOUT_US,
reviews: reviewsData,
linkText: LINK_REVIEWS_ALL
}
}

0 comments on commit 8c67446

Please sign in to comment.