diff --git a/src/shared/header/Header.stories.js b/src/shared/header/Header.stories.js index 9100f597c..998a0bd93 100644 --- a/src/shared/header/Header.stories.js +++ b/src/shared/header/Header.stories.js @@ -1,10 +1,10 @@ -import { Header } from './Header' +import { Header } from './Header'; const meta = { - title: 'Otus/Common/Header', - component: Header -} + title: 'Otus/Common/Header', + component: Header, +}; -export default meta +export default meta; -export const Default = {} \ No newline at end of file +export const Default = {}; diff --git a/src/shared/layout/Layout.stories.js b/src/shared/layout/Layout.stories.js index b7b027b21..b54890a28 100644 --- a/src/shared/layout/Layout.stories.js +++ b/src/shared/layout/Layout.stories.js @@ -1,14 +1,15 @@ -import { Layout } from './Layout' +import { React } from 'react'; +import { Layout } from './Layout'; const meta = { - title: 'Otus/Common/Layout', - component: Layout, -} + title: 'Otus/Common/Layout', + component: Layout, +}; -export default meta +export default meta; export const Default = { - args: { - children: [
] - }, -} \ No newline at end of file + args: { + children: [], + }, +}; diff --git a/src/shared/logo/Logo.stories.js b/src/shared/logo/Logo.stories.js index 7eb502007..420834891 100644 --- a/src/shared/logo/Logo.stories.js +++ b/src/shared/logo/Logo.stories.js @@ -1,10 +1,10 @@ -import { Logo } from './Logo' +import { Logo } from './Logo'; const meta = { - title: 'Otus/Common/Logo', - component: Logo, + title: 'Otus/Common/Logo', + component: Logo, }; -export default meta +export default meta; -export const Default = {} \ No newline at end of file +export const Default = {}; diff --git a/src/shared/modal/Modal.stories.js b/src/shared/modal/Modal.stories.js index 607fbeb1b..b8f2e1d7f 100644 --- a/src/shared/modal/Modal.stories.js +++ b/src/shared/modal/Modal.stories.js @@ -1,18 +1,23 @@ -import { Modal } from './Modal' +import { React } from 'react'; +import { Modal } from './Modal'; const meta = { - title: 'Otus/Common/Modal', - component: Modal, - argTypes: { - visible: { control: 'boolean' }, - }, -} + title: 'Otus/Common/Modal', + component: Modal, + argTypes: { + visible: { control: 'boolean' }, + }, +}; -export default meta +export default meta; export const Default = { - args: { - visible: true, - children: ["Hello, World!"
] - }, -} \ No newline at end of file + args: { + visible: true, + children: [ ++ Hello, World! +
, + ], + }, +}; diff --git a/src/shared/shopping/cartitem/CartItem.stories.js b/src/shared/shopping/cartitem/CartItem.stories.js index f1228baf9..ad0517f83 100644 --- a/src/shared/shopping/cartitem/CartItem.stories.js +++ b/src/shared/shopping/cartitem/CartItem.stories.js @@ -1,20 +1,20 @@ -import { CartItem } from "./CartItem" +import { CartItem } from './CartItem'; const meta = { - title: 'Otus/Shopping/CartItem', - component: CartItem, - tags: ['autodocs'], - argTypes: { - title: { - control: 'text' - }, + title: 'Otus/Shopping/CartItem', + component: CartItem, + tags: ['autodocs'], + argTypes: { + title: { + control: 'text', }, -} + }, +}; -export default meta +export default meta; export const Default = { - args: { - title: "Awesome thing", - }, -} \ No newline at end of file + args: { + title: 'Awesome thing', + }, +}; diff --git a/src/shared/shopping/itemcard/ItemCard.stories.js b/src/shared/shopping/itemcard/ItemCard.stories.js index 321a2fa92..37f44c777 100644 --- a/src/shared/shopping/itemcard/ItemCard.stories.js +++ b/src/shared/shopping/itemcard/ItemCard.stories.js @@ -1,28 +1,28 @@ -import { ItemCard } from "./ItemCard" +import { ItemCard } from './ItemCard'; const meta = { - title: 'Otus/Shopping/ItemCard', - component: ItemCard, - tags: ['autodocs'], - argTypes: { - price: { - control: 'number' - }, - title: { - control: 'text' - }, - desc: { - control: 'text' - }, + title: 'Otus/Shopping/ItemCard', + component: ItemCard, + tags: ['autodocs'], + argTypes: { + price: { + control: 'number', }, -} + title: { + control: 'text', + }, + desc: { + control: 'text', + }, + }, +}; -export default meta +export default meta; export const Default = { - args: { - price: 100, - title: "Awesome thing", - desc: "Everyone needs it!" - }, -} \ No newline at end of file + args: { + price: 100, + title: 'Awesome thing', + desc: 'Everyone needs it!', + }, +}; diff --git a/src/shared/shopping/itempage/ItemPage.stories.js b/src/shared/shopping/itempage/ItemPage.stories.js index 1013c051c..b5541b38e 100644 --- a/src/shared/shopping/itempage/ItemPage.stories.js +++ b/src/shared/shopping/itempage/ItemPage.stories.js @@ -1,19 +1,19 @@ -import { ItemPage } from "./ItemPage" +import { ItemPage } from './ItemPage'; const meta = { - title: 'Otus/Shopping/ItemPage', - component: ItemPage, - tags: ['autodocs'] -} + title: 'Otus/Shopping/ItemPage', + component: ItemPage, + tags: ['autodocs'], +}; -export default meta +export default meta; export const Default = { - args: { - price: 100, - title: "Awesome thing", - desc: "Everyone needs it!", - images: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], - category: "food", - }, -} \ No newline at end of file + args: { + price: 100, + title: 'Awesome thing', + desc: 'Everyone needs it!', + images: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], + category: 'food', + }, +}; diff --git a/src/shared/shopping/purchasebutton/PurchaseButton.stories.js b/src/shared/shopping/purchasebutton/PurchaseButton.stories.js index 7736a56af..cabaaf107 100644 --- a/src/shared/shopping/purchasebutton/PurchaseButton.stories.js +++ b/src/shared/shopping/purchasebutton/PurchaseButton.stories.js @@ -1,36 +1,36 @@ -import { PurchaseButton } from './PurchaseButton' +import { PurchaseButton } from './PurchaseButton'; const meta = { - title: 'Otus/Shopping/PurchaseButton', - component: PurchaseButton, - tags: ['autodocs'], - parameters: { - docs: { - description: { - component: 'Button to add item to the cart' - } - } + title: 'Otus/Shopping/PurchaseButton', + component: PurchaseButton, + tags: ['autodocs'], + parameters: { + docs: { + description: { + component: 'Button to add item to the cart', + }, }, - argTypes: { - count: { - description: "Number of items in the cart", - control: 'number' - }, + }, + argTypes: { + count: { + description: 'Number of items in the cart', + control: 'number', }, -} + }, +}; -export default meta +export default meta; export const EmptyCartButton = { - name: "Without items", - args: { - count: 0 - }, -} + name: 'Without items', + args: { + count: 0, + }, +}; export const ButtonWithPurchase = { - name: "With items", - args: { - count: 2 - }, -} \ No newline at end of file + name: 'With items', + args: { + count: 2, + }, +}; diff --git a/src/stories/Button.tsx b/src/stories/Button.tsx index 244ff033e..57c74e5b0 100644 --- a/src/stories/Button.tsx +++ b/src/stories/Button.tsx @@ -30,12 +30,7 @@ interface ButtonProps { export function Button({ primary = false, size = 'medium', backgroundColor, label, ...props }: ButtonProps) { const mode = primary ? s.primary : s.secondary; return ( -