-
Notifications
You must be signed in to change notification settings - Fork 3
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
1 parent
74ae936
commit 2f36fe7
Showing
5 changed files
with
52 additions
and
0 deletions.
There are no files selected for viewing
File renamed without changes.
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,9 @@ | ||
textarea { | ||
width: 100%; | ||
box-sizing: border-box; | ||
margin-top: 10px; | ||
} | ||
#counter { | ||
border: solid 1px; | ||
padding: 5px; | ||
} |
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,17 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<link rel="stylesheet" type="text/css" href="index.css"> | ||
</head> | ||
<body> | ||
<path-view> | ||
<span id="counter"></span> | ||
</path-view> | ||
<textarea id="content" rows="10"></textarea> | ||
|
||
<script type="text/javascript" src="../path-view.js"></script> | ||
<script type="text/javascript" src="index.js"></script> | ||
</body> | ||
</html> |
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,26 @@ | ||
const view = document.querySelector('path-view'); | ||
view.build([ | ||
{title: '1 - This is a Long Text', checked: true}, | ||
{ | ||
title: '2 - This is a Long Text', | ||
checked: true, | ||
extra: { | ||
comment: 'You can have extra properties' | ||
} | ||
}, | ||
{title: '3 - This is a Long Text'}, | ||
{title: '4 - This is a Long Text'}, | ||
{title: '5 - This is a Long Text'}, | ||
{title: '6 - This is a Long Text'}, | ||
{title: '7 - This is a Long Text'}, | ||
{title: '8 - This is a Long Text'}, | ||
{title: '9 - This is a Long Text'}, | ||
{title: '10 - This is a Long Text'}, | ||
{title: '11 - This is a Long Text'}, | ||
{title: '12 - This is a Long Text'} | ||
]); | ||
view.addEventListener('change', e => { | ||
document.getElementById('counter').textContent = e.target.value.title; | ||
document.getElementById('content').value = JSON.stringify(e.target.value, undefined, ' '); | ||
}); | ||
view.dispatchEvent(new Event('change')); |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.