-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #37 from AdamWard1995/rendererDemo
Renderer demo
- Loading branch information
Showing
10 changed files
with
119 additions
and
26 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
15 changes: 15 additions & 0 deletions
15
tests/dummy/app/pods/components/multi-line-renderer/component.js
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 @@ | ||
/** | ||
* Component definition for the text-input-renderer component | ||
*/ | ||
import {CellRenderer} from 'ember-frost-table' | ||
import layout from './template' | ||
|
||
// BEGIN-SNIPPET multi-line-renderer | ||
export default CellRenderer.extend({ | ||
|
||
layout, | ||
|
||
actions: { | ||
} | ||
}) | ||
// END-SNIPPET |
6 changes: 6 additions & 0 deletions
6
tests/dummy/app/pods/components/multi-line-renderer/template.hbs
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,6 @@ | ||
{{! Template for the text-input-renderer component }} | ||
{{! BEGIN-SNIPPET multi-line-renderer}} | ||
{{#each value as |val|}} | ||
<div class='line'>{{val}}</div> | ||
{{/each}} | ||
{{! END-SNIPPET }} |
19 changes: 2 additions & 17 deletions
19
tests/dummy/app/pods/components/text-input-renderer/component.js
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,30 +1,15 @@ | ||
/** | ||
* Component definition for the text-input-renderer component | ||
*/ | ||
|
||
import {CellRenderer} from 'ember-frost-table' | ||
|
||
import layout from './template' | ||
|
||
// BEGIN-SNIPPET text-input-renderer | ||
export default CellRenderer.extend({ | ||
// == Dependencies ========================================================== | ||
|
||
// == Keyword Properties ==================================================== | ||
|
||
layout, | ||
|
||
// == PropTypes ============================================================= | ||
|
||
// == Computed Properties =================================================== | ||
|
||
// == Functions ============================================================= | ||
|
||
// == DOM Events ============================================================ | ||
|
||
// == Lifecycle Hooks ======================================================= | ||
|
||
// == Actions =============================================================== | ||
|
||
actions: { | ||
} | ||
}) | ||
// END-SNIPPET |
2 changes: 2 additions & 0 deletions
2
tests/dummy/app/pods/components/text-input-renderer/template.hbs
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,8 +1,10 @@ | ||
{{! Template for the text-input-renderer component }} | ||
{{! BEGIN-SNIPPET text-input-renderer}} | ||
{{frost-text | ||
hook=(concat hookPrefix '-text') | ||
hookPrefix=hook | ||
hookQualifiers=hookQualifiers | ||
onInput=(action 'handleInput') | ||
value=value | ||
}} | ||
{{! END-SNIPPET }} |
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,6 @@ | ||
import HeroesController from '../heroes-controller' | ||
|
||
export default HeroesController.extend({ | ||
actions: { | ||
} | ||
}) |
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,66 @@ | ||
{{! template-lint-disable bare-strings }} | ||
{{!-- BEGIN-SNIPPET cell-renderer }} | ||
{{component 'cell-renderer' | ||
hook= // e.g. myCellRenderer | ||
item= // item associated with the cell's row | ||
value // item value to display in this cell | ||
}} | ||
{{ END-SNIPPET --}} | ||
|
||
|
||
<div class='frost-demo-api'> | ||
<div class='frost-demo-title'> | ||
Cell Renderer API | ||
</div> | ||
<br> | ||
<div class='frost-demo-notes'> | ||
Can be applied to body or header cells for a particular column | ||
</div> | ||
<div class='frost-demo-snippet'> | ||
{{code-snippet name='cell-renderer.hbs'}} | ||
</div> | ||
<div class='frost-demo-title'> | ||
Examples | ||
</div> | ||
<div class='frost-demo-notes'> | ||
text-input-renderer | ||
</div> | ||
<div class='frost-demo-snippet'> | ||
{{code-snippet name='text-input-renderer.hbs'}} | ||
</div> | ||
<div class='frost-demo-notes'> | ||
multi-line-renderer | ||
</div> | ||
<div class='frost-demo-snippet'> | ||
{{code-snippet name='multi-line-renderer.hbs'}} | ||
{{code-snippet name='multi-line-renderer.scss'}} | ||
</div> | ||
</div> | ||
<div class='frost-demo-live'> | ||
<div class='frost-demo-title'> | ||
Live demo | ||
</div> | ||
<div class='frost-demo-snippet'> | ||
{{code-snippet name='cell-renderer-table.hbs'}} | ||
</div> | ||
<div class='frost-demo-launch'> | ||
{{! BEGIN-SNIPPET cell-renderer-table }} | ||
{{frost-table | ||
columns=(array | ||
(hash | ||
label='Name' | ||
propertyName='name' | ||
renderer=(component 'text-input-renderer') | ||
) | ||
(hash | ||
label='Team Affiliations' | ||
propertyName='teamAffiliations' | ||
renderer=(component 'multi-line-renderer') | ||
) | ||
) | ||
hook='myTable' | ||
items=heroes | ||
}} | ||
{{! END-SNIPPET }} | ||
</div> | ||
</div> |
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
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