mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-05-16 12:55:32 +08:00
29 lines
833 B
Text
29 lines
833 B
Text
import Component from "@ember/component";
|
|
import { classNames } from "@ember-decorators/component";
|
|
import { eq } from "truth-helpers";
|
|
import concatClass from "discourse/helpers/concat-class";
|
|
import { i18n } from "discourse-i18n";
|
|
|
|
@classNames("row")
|
|
export default class AdminFormRow extends Component {
|
|
<template>
|
|
<div class="form-element label-area">
|
|
{{#if this.label}}
|
|
<label
|
|
class={{concatClass (if (eq @type "checkbox") "checkbox-label")}}
|
|
>{{i18n this.label}}</label>
|
|
{{else}}
|
|
|
|
{{/if}}
|
|
</div>
|
|
<div class="form-element input-area">
|
|
{{#if this.wrapLabel}}
|
|
<label
|
|
class={{concatClass (if (eq @type "checkbox") "checkbox-label")}}
|
|
>{{yield}}</label>
|
|
{{else}}
|
|
{{yield}}
|
|
{{/if}}
|
|
</div>
|
|
</template>
|
|
}
|