discourse/app/assets/javascripts/float-kit/addon/components/d-float-portal.gjs

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>
}