radh-ui
Version:
Stencil Component Starter
33 lines (29 loc) • 906 B
JavaScript
import { r as registerInstance, c as createEvent, h } from './index-a9700b09.js';
const radhGitlabUsersCss = "";
class RadhGitlabUsers {
constructor(hostRef) {
registerInstance(this, hostRef);
this.toasted = createEvent(this, "toasted", 7);
}
getUserSelected(ev) {
this.toasted.emit(ev.detail);
}
fetchGitLabUsers() {
fetch("/assets/data/users.json")
.then(resp => resp.json())
.then(data => (this.userData = data));
}
componentWillLoad() {
this.fetchGitLabUsers();
}
render() {
if (!this.userData) {
return null;
}
return [
h("radh-fluid-grid", null, this.userData.map(user => (h("radh-user", { avatar: true, user: JSON.stringify(user) }))))
];
}
}
RadhGitlabUsers.style = radhGitlabUsersCss;
export { RadhGitlabUsers as radh_gitlab_users };