build(docs-infra): move overload short description above syntax (#24526)

PR Close #24526
This commit is contained in:
Pete Bacon Darwin 2018-06-14 22:06:59 +01:00 committed by Miško Hevery
parent 71b0c3d469
commit 8c51ce6f3b
3 changed files with 7 additions and 3 deletions

View File

@ -37,5 +37,9 @@
padding: 16px 24px; padding: 16px 24px;
} }
} }
.short-description {
margin-left: 0;
}
} }
} }

View File

@ -1,7 +1,7 @@
{% import "lib/memberHelpers.html" as memberHelper -%} {% import "lib/memberHelpers.html" as memberHelper -%}
<section class="{$ doc.docType $}-overview"> <section class="{$ doc.docType $}-overview">
<code-example language="ts" hideCopy="true"> <code-example language="ts" hideCopy="true" linenums="false">
{% if doc.isAbstract %}abstract {% endif%}{$ doc.docType $} {$ doc.name $}{$ doc.typeParams | escape $}{$ memberHelper.renderHeritage(doc) $} {{$ memberHelper.renderMembers(doc) $} {% if doc.isAbstract %}abstract {% endif%}{$ doc.docType $} {$ doc.name $}{$ doc.typeParams | escape $}{$ memberHelper.renderHeritage(doc) $} {{$ memberHelper.renderMembers(doc) $}
} }
</code-example> </code-example>

View File

@ -40,13 +40,13 @@
{%- macro renderOverloadInfo(overload, cssClass, method) -%} {%- macro renderOverloadInfo(overload, cssClass, method) -%}
<code-example language="ts" hideCopy="true" class="no-box api-heading">{$ renderMemberSyntax(overload) $}</code-example>
{% if overload.shortDescription and (overload.shortDescription != method.shortDescription) %} {% if overload.shortDescription and (overload.shortDescription != method.shortDescription) %}
<div class="short-description"> <div class="short-description">
{$ overload.shortDescription | marked $} {$ overload.shortDescription | marked $}
</div>{% endif %} </div>{% endif %}
<code-example language="ts" hideCopy="true" linenums="false" class="no-box api-heading">{$ renderMemberSyntax(overload) $}</code-example>
<h4 class="no-anchor">Parameters</h4> <h4 class="no-anchor">Parameters</h4>
{$ params.renderParameters(overload.parameterDocs, cssClass + '-parameters', cssClass + '-parameter') $} {$ params.renderParameters(overload.parameterDocs, cssClass + '-parameters', cssClass + '-parameter') $}