-
-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
81 additions
and
1 deletion.
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
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,27 @@ | ||
# Luna File List | ||
|
||
List files in the directory. | ||
|
||
## Demo | ||
|
||
https://luna.liriliri.io/?path=/story/file-list | ||
|
||
## Install | ||
|
||
Add the following script and style to your page. | ||
|
||
```html | ||
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/luna-file-list/luna-file-list.css" /> | ||
<script src="//cdn.jsdelivr.net/npm/luna-file-list/luna-file-list.js"></script> | ||
``` | ||
|
||
You can also get it on npm. | ||
|
||
```bash | ||
npm install luna-file-list --save | ||
``` | ||
|
||
```javascript | ||
import 'luna-file-list/luna-file-list.css' | ||
import LunaFileList from 'luna-file-list' | ||
``` |
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,15 @@ | ||
import Component from '../share/Component' | ||
import { exportCjs } from '../share/util' | ||
|
||
/** | ||
* List files in the directory. | ||
*/ | ||
export default class FileList extends Component { | ||
constructor(container: HTMLElement) { | ||
super(container, { compName: 'file-list' }) | ||
} | ||
} | ||
|
||
if (typeof module !== 'undefined') { | ||
exportCjs(module, FileList) | ||
} |
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,8 @@ | ||
{ | ||
"name": "file-list", | ||
"version": "0.1.0", | ||
"description": "List files in the directory", | ||
"luna": { | ||
"test": false | ||
} | ||
} |
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,20 @@ | ||
import 'luna-file-list.css' | ||
import FileList from 'luna-file-list.js' | ||
import readme from './README.md' | ||
import story from '../share/story' | ||
|
||
const def = story( | ||
'file-list', | ||
(container) => { | ||
const fileList = new FileList(container) | ||
|
||
return fileList | ||
}, | ||
{ | ||
readme, | ||
story: __STORY__, | ||
} | ||
) | ||
|
||
export default def | ||
export const { fileList } = def |
Empty file.
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