pulumi/pkg/codegen/docs/templates/properties.tmpl

30 lines
1.3 KiB
Cheetah

{{ define "properties" }}
{{- range $lang, $props := . }}
<div>
<pulumi-choosable type="language" values="{{- if eq $lang "nodejs" -}}{{ print "javascript,typescript" }}{{- else -}}{{ print $lang }}{{- end -}}">
<dl class="resources-properties">
{{- range . -}}
<dt class="property-{{- if .IsInput -}}{{- if .IsRequired -}}required{{- else -}}optional{{- end -}}{{- end -}}{{ if .DeprecationMessage }} property-deprecated{{- end -}}{{ if .IsReplaceOnChanges }} property-replacement{{- end -}}"
title="{{ if .IsInput -}}{{- if .IsRequired -}}Required{{- else -}}Optional{{- end -}}{{- end -}}{{- if .DeprecationMessage -}}, Deprecated{{- end -}}">
<span id="{{ htmlSafe .ID }}">{{ template "linkify_wo_style" . }}</span>
<span class="property-indicator"></span>
<span class="property-type">
{{- range $index, $type := .Types }}
{{- if gt $index 0 }} | {{ end -}}
{{- if eq .Link "#" "" -}}{{- htmlSafe .DisplayName -}}{{- else -}}{{ template "linkify" . }}{{- end -}}
{{- end -}}
</span>
</dt>
<dd>{{- markdownify .Comment -}}{{- if .DeprecationMessage -}}<p class="property-message">Deprecated: {{ markdownify .DeprecationMessage -}}</p>{{- end -}}
</dd>
{{- end -}}
</dl>
</pulumi-choosable>
</div>
{{- end }}
{{- end }}