Skip to content

Commit

Permalink
исправил конфликты
Browse files Browse the repository at this point in the history
  • Loading branch information
evgeny committed Mar 6, 2024
1 parent 9fef814 commit 359e27d
Show file tree
Hide file tree
Showing 7 changed files with 61 additions and 21 deletions.
23 changes: 23 additions & 0 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import type { StorybookConfig } from '@storybook/react-webpack5'

const config: StorybookConfig = {
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
addons: [
'@storybook/addon-links',
'@storybook/addon-essentials',
'@storybook/addon-onboarding',
'@storybook/addon-interactions'
],
framework: {
name: '@storybook/react-webpack5',
options: {
builder: {
useSWC: true
}
}
},
docs: {
autodocs: 'tag'
}
}
export default config
15 changes: 15 additions & 0 deletions .storybook/preview.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import type { Preview } from '@storybook/react'

const preview: Preview = {
parameters: {
actions: { argTypesRegex: '^on[A-Z].*' },
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/i
}
}
}
}

export default preview
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
"@storybook/blocks": "^7.5.1",
"@storybook/react": "^7.5.1",
"@storybook/react-webpack5": "^7.5.1",
"@storybook/test": "^7.6.16",
"@storybook/testing-library": "^0.2.2",
"@svgr/webpack": "^8.1.0",
"@types/react": "18.2.20",
Expand Down
4 changes: 4 additions & 0 deletions src/app/router/AppRouter/ui/AppRouter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,10 @@ export const AppRouter = createBrowserRouter([
path: Routes.PRODUCT,
element: <ProductPage />
}
/* {
path: Routes.CERTIFICATE,
element: <Certificate />
} */
]
}
])
8 changes: 3 additions & 5 deletions src/pages/HelpPage/HelpPage.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
import styles from './HelpPage.module.scss'
import Heading, { HeadingType } from '@/shared/ui/Heading/Heading'
import Subheading from '@/shared/ui/Subheading/Subheading'
import HelpCategories from '@/widgets/HelpCategories/HelpCategories'
import FormReturn from '@/widgets/FormReturn/FormReturn'
import HelpCategories from '@/widgets/HelpCategories/HelpCategories'

import WrapperForMainContent from '../../components/WrapperForMainContent/WrapperForMainContent'

// @TODO: Сверстать форму возврата
// Сделал страницу помощи
// https://github.com/Studio-Yandex-Practicum/maxboom_frontend/issues/222
import styles from './HelpPage.module.scss'

const HelpPage = () => {
return (
Expand Down
2 changes: 1 addition & 1 deletion src/stories/Configure.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ export const RightArrow = () => (
<p className="sb-section-item-paragraph">Use stories to test a component in all its variations, no matter how
complex.</p>
<a
href="https://storybook.js.org/docs/react/writing-tests/introduction"
href="https://storybook.js.org/docs/react/writing-tests"
target="_blank"
>Learn more<RightArrow /></a>
</div>
Expand Down
29 changes: 14 additions & 15 deletions src/widgets/HelpCategories/HelpCategories.tsx
Original file line number Diff line number Diff line change
@@ -1,23 +1,22 @@
import styles from './HelpCategories.module.scss'
import Link from '@/shared/ui/Link/Link'

// @TODO: Сверстать форму возврата
// Сделал sidebar для страницы помощь
// https://github.com/Studio-Yandex-Practicum/maxboom_frontend/issues/222
import styles from './HelpCategories.module.scss'

const HelpCategories = () => {
return (
<nav className={styles.helpCategories}>
<Link to="" className={styles.helpCategories__item}>
Информация о доставке
</Link>
<Link to="" className={styles.helpCategories__item}>
Возвраты
</Link>
<Link to="" className={styles.helpCategories__item}>
Подарочные сертификаты
</Link>
</nav>
<>
<nav className={styles.helpCategories}>
<Link to="" className={styles.helpCategories__item}>
Информация о доставке
</Link>
<Link to="" className={styles.helpCategories__item}>
Возвраты
</Link>
<Link to="" className={styles.helpCategories__item}>
Подарочные сертификаты
</Link>
</nav>
</>
)
}

Expand Down

0 comments on commit 359e27d

Please sign in to comment.