This repository has been archived by the owner on Apr 5, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add Name of file to preview Link (#187)
* add Name of file to preview Link * add story for new fodler * update snapshots * undo package-lock change * rename story * try to fix storybook: storybookjs/storybook#15067
- Loading branch information
Showing
5 changed files
with
129 additions
and
15 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,14 @@ | ||
module.exports = { | ||
"stories": [ | ||
"../src/**/*.stories.mdx", | ||
"../src/**/*.stories.@(js|jsx|ts|tsx)" | ||
], | ||
"addons": [ | ||
"@storybook/addon-links", | ||
"@storybook/addon-essentials", | ||
"@storybook/preset-create-react-app" | ||
] | ||
} | ||
stories: [ | ||
"../src/**/*.stories.mdx", | ||
"../src/**/*.stories.@(js|jsx|ts|tsx)" | ||
], | ||
addons: [ | ||
"@storybook/addon-links", | ||
"@storybook/addon-essentials", | ||
"@storybook/preset-create-react-app" | ||
], | ||
typescript: { | ||
reactDocgen: "none" | ||
} | ||
}; |
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
28 changes: 28 additions & 0 deletions
28
src/components/pages/filesytem/upload/NewFolderModalContent.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,28 @@ | ||
import { storiesOf } from "@storybook/react"; | ||
import { Provider } from "react-redux"; | ||
import store from "../../../../background/redux/store"; | ||
import { BrowserRouter } from "react-router-dom"; | ||
import React from "react"; | ||
import { NewFolderModalContent } from "./NewFolderModalContent"; | ||
import { filesystemPath, hostname } from "../../../../background/api/api"; | ||
import MockAdapter from "axios-mock-adapter"; | ||
import axios from "axios"; | ||
import folderContentMock from "../__tests__/folderContentMock.json"; | ||
|
||
storiesOf("Filesystem", module).add("NewFolderModal", () => { | ||
const API_REQUEST = hostname + filesystemPath + "2/folder/create"; | ||
|
||
const mock = new MockAdapter(axios); | ||
mock.onPost(API_REQUEST).reply(200, folderContentMock[0]); | ||
|
||
return ( | ||
<Provider store={store}> | ||
<BrowserRouter> | ||
<NewFolderModalContent | ||
handleClose={() => {}} | ||
currentFsItemId={"2"} | ||
/> | ||
</BrowserRouter> | ||
</Provider> | ||
); | ||
}); |
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