@prozilla-os/file-explorer 1.0.9 → 1.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +37 -0
- package/dist/main.js +563 -554
- package/dist/main.js.map +1 -1
- package/package.json +5 -4
package/README.md
CHANGED
|
@@ -27,6 +27,8 @@ $ pnpm add @prozilla-os/core @prozilla-os/file-explorer
|
|
|
27
27
|
|
|
28
28
|
## Usage
|
|
29
29
|
|
|
30
|
+
### Basic setup
|
|
31
|
+
|
|
30
32
|
```tsx
|
|
31
33
|
import { Desktop, ModalsView, ProzillaOS, Taskbar, WindowsView, AppsConfig } from "@prozilla-os/core";
|
|
32
34
|
import { fileExplorer } from "@prozilla-os/file-explorer";
|
|
@@ -51,6 +53,41 @@ function App() {
|
|
|
51
53
|
}
|
|
52
54
|
```
|
|
53
55
|
|
|
56
|
+
### Window options
|
|
57
|
+
|
|
58
|
+
```tsx
|
|
59
|
+
/**
|
|
60
|
+
* Initial path that the app will open
|
|
61
|
+
* @default "~" - Home directory
|
|
62
|
+
*/
|
|
63
|
+
path: string;
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Defines in which mode the application is running
|
|
67
|
+
* 0: None
|
|
68
|
+
* 1: Single
|
|
69
|
+
* 2: Multiple
|
|
70
|
+
* @default 0
|
|
71
|
+
*/
|
|
72
|
+
selectorMode: number;
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Footer component that will be displayed when `selectorMode` != 0
|
|
76
|
+
* Can be used to display a list of selected files for example
|
|
77
|
+
*/
|
|
78
|
+
Footer: React.FC;
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Gets called each time the selection changes if `selectorMode` != 0
|
|
82
|
+
*/
|
|
83
|
+
onSelectionChange: (params: OnSelectionChangeParams) => void;
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Gets called when the selection is finished if `selectorMode` != 0
|
|
87
|
+
*/
|
|
88
|
+
onSelectionFinish: Function;
|
|
89
|
+
```
|
|
90
|
+
|
|
54
91
|
## Links
|
|
55
92
|
|
|
56
93
|
- [Website/demo][website]
|