discourse/app/assets/javascripts/float-kit/addon/components/d-float-portal.gjs
David Taylor ee0fef489f DEV: Move gjs <template> to bottom of class definitions
To satisfy updated eslint configuration
2023-10-10 21:46:54 +01:00

19 lines
407 B
Plaintext

import Component from "@glimmer/component";
import { isTesting } from "discourse-common/config/environment";
export default class DFloatPortal extends Component {
get inline() {
return this.args.inline ?? isTesting();
}
<template>
{{#if this.inline}}
{{yield}}
{{else}}
{{#in-element @portalOutletElement}}
{{yield}}
{{/in-element}}
{{/if}}
</template>
}