refactor: 💡 convert list components to nested structure
This commit is contained in:
6 files changed
+10
-15
No files matched your search
@@ -1,7 +0,0 @@
|
||||
import Component from '@ember/component';
|
||||
import layout from '../../../templates/components/rose/list/key-value';
|
||||
|
||||
export default Component.extend({
|
||||
layout,
|
||||
tagName: '',
|
||||
});
|
||||
@@ -0,0 +1,5 @@
|
||||
<ul class="rose-list-key-value">
|
||||
{{yield (hash
|
||||
item=(component 'rose/list/key-value/item')
|
||||
)}}
|
||||
</ul>
|
||||
File renamed without changes.
@@ -1,8 +0,0 @@
|
||||
import Component from '@ember/component';
|
||||
import layout from '../../../../templates/components/rose/list/key-value/item';
|
||||
import ComponentAutoId from '../../../../mixins/component-auto-id';
|
||||
|
||||
export default Component.extend(ComponentAutoId, {
|
||||
layout,
|
||||
tagName: '',
|
||||
});
|
||||
@@ -0,0 +1,13 @@
|
||||
<li class="rose-list-key-value-item" aria-labelledby={{concat "item-key-" this.id}}>
|
||||
{{yield (hash
|
||||
key=(component 'rose/anonymous'
|
||||
id=(concat "item-key-" this.id)
|
||||
tagName='div'
|
||||
classNames='rose-list-key-value-item-cell'
|
||||
)
|
||||
cell=(component 'rose/anonymous'
|
||||
tagName='div'
|
||||
classNames='rose-list-key-value-item-cell'
|
||||
)
|
||||
)}}
|
||||
</li>
|
||||
@@ -0,0 +1,10 @@
|
||||
import Component from '@glimmer/component';
|
||||
import { generateComponentID } from '../../../../../utilities/component-auto-id';
|
||||
|
||||
export default class RoseListKeyValueItemComponent extends Component {
|
||||
|
||||
// =attributes
|
||||
|
||||
id = generateComponentID();
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user