|
1 | 1 | {% import "macros.html" as macros %} |
2 | 2 |
|
3 | | -<table class="docs-api-method-table"> |
4 | | - <thead> |
5 | | - <tr class="docs-api-method-name-row"> |
6 | | - <th colspan="2" class="docs-api-method-name-cell"> |
7 | | - {%- if method.isDeprecated -%} |
8 | | - <div class="docs-api-deprecated-marker" {$ macros.deprecationTitle(method) $}> |
9 | | - Deprecated |
| 3 | +<div class="docs-api-method-card"> |
| 4 | + <table class="docs-api-method-table"> |
| 5 | + <thead> |
| 6 | + <tr class="docs-api-method-name-row"> |
| 7 | + <th colspan="2" class="docs-api-method-name-cell"> |
| 8 | + {%- if method.isDeprecated -%} |
| 9 | + <div class="docs-api-deprecated-marker" {$ macros.deprecationTitle(method) $}> |
| 10 | + Deprecated |
| 11 | + </div> |
| 12 | + {%- endif -%} |
| 13 | + {%- if method.isStatic -%} |
| 14 | + <div class="docs-api-modifier-method-marker"> |
| 15 | + static |
10 | 16 | </div> |
11 | | - {%- endif -%} |
12 | | - {%- if method.isStatic -%} |
13 | | - <div class="docs-api-modifier-method-marker"> |
14 | | - static |
15 | | - </div> |
16 | | - {%- endif -%} |
17 | | - {%- if method.isAsync -%} |
18 | | - <div class="docs-api-modifier-method-marker"> |
19 | | - async |
20 | | - </div> |
21 | | - {%- endif -%} |
22 | | - {$ method.name $} |
23 | | - </th> |
| 17 | + {%- endif -%} |
| 18 | + {%- if method.isAsync -%} |
| 19 | + <div class="docs-api-modifier-method-marker"> |
| 20 | + async |
| 21 | + </div> |
| 22 | + {%- endif -%} |
| 23 | + {$ method.name $} |
| 24 | + ({%- for param in method.params -%} |
| 25 | + <span class="docs-api-method-parameter-name">{$ param.name $}{% if param.isOptional %}<span class="docs-api-method-parameter-optional-marker">?</span>{% endif %}: |
| 26 | + </span> |
| 27 | + <code class="docs-api-method-parameter-type">{$ param.type $}</code>{% if not loop.last %}, {% endif %} |
| 28 | + {%- endfor -%} |
| 29 | + ): <code class="docs-api-method-returns-type">{$ method.type $}</code> |
| 30 | + </th> |
| 31 | + </tr> |
| 32 | + </thead> |
| 33 | + {%- if method.description -%} |
| 34 | + <tr class="docs-api-method-description-row"> |
| 35 | + <td colspan="2" class="docs-api-method-description-cell"> |
| 36 | + {$ method.description | marked | safe $} |
| 37 | + </td> |
24 | 38 | </tr> |
25 | | - </thead> |
26 | | - {%- if method.description -%} |
27 | | - <tr class="docs-api-method-description-row"> |
28 | | - <td colspan="2" class="docs-api-method-description-cell"> |
29 | | - {$ method.description | marked | safe $} |
30 | | - </td> |
31 | | - </tr> |
32 | | - {%- endif -%} |
| 39 | + {%- endif -%} |
33 | 40 |
|
34 | | - {%- if method.params.length -%} |
35 | | - <thead> |
36 | | - <tr class="docs-api-method-parameters-header-row"> |
37 | | - <th colspan="2" class="docs-api-method-parameters-header-cell">Parameters</th> |
| 41 | + {%- if method.params.length -%} |
| 42 | + <thead> |
| 43 | + <tr class="docs-api-method-parameters-header-row"> |
| 44 | + <th colspan="2" class="docs-api-method-parameters-header-cell">Parameters</th> |
| 45 | + </tr> |
| 46 | + </thead> |
| 47 | + {% for parameter in method.params %} |
| 48 | + <tr class="docs-api-method-parameter-row"> |
| 49 | + <td class="docs-api-method-parameter-cell"> |
| 50 | + <p class="docs-api-method-parameter-name"> |
| 51 | + {$ parameter.name $} |
| 52 | + {%- if parameter.isOptional -%} |
| 53 | + <span class="docs-api-method-parameter-optional-marker">?</span> |
| 54 | + {%- endif -%} |
| 55 | + </p> |
| 56 | + <code class="docs-api-method-parameter-type">{$ parameter.type $}</code> |
| 57 | + </td> |
| 58 | + <td class="docs-api-method-parameter-description-cell"> |
| 59 | + <p class="docs-api-method-parameter-description"> |
| 60 | + {$ parameter.description | marked | safe $} |
| 61 | + </p> |
| 62 | + </td> |
38 | 63 | </tr> |
39 | | - </thead> |
40 | | - {% for parameter in method.params %} |
41 | | - <tr class="docs-api-method-parameter-row"> |
42 | | - <td class="docs-api-method-parameter-cell"> |
43 | | - <p class="docs-api-method-parameter-name"> |
44 | | - {$ parameter.name $} |
45 | | - {%- if parameter.isOptional -%} |
46 | | - <span class="docs-api-method-parameter-optional-marker">?</span> |
47 | | - {%- endif -%} |
48 | | - </p> |
49 | | - <code class="docs-api-method-parameter-type">{$ parameter.type $}</code> |
50 | | - </td> |
51 | | - <td class="docs-api-method-parameter-description-cell"> |
52 | | - <p class="docs-api-method-parameter-description"> |
53 | | - {$ parameter.description | marked | safe $} |
54 | | - </p> |
55 | | - </td> |
56 | | - </tr> |
57 | | - {% endfor %} |
58 | | - {%- endif -%} |
| 64 | + {% endfor %} |
| 65 | + {%- endif -%} |
59 | 66 |
|
60 | | - {%- if method.type and method.type !== "void" -%} |
61 | | - <thead> |
62 | | - <tr class="docs-api-method-returns-header-row"> |
63 | | - <th colspan="2" class="docs-api-method-returns-header-cell">Returns</th> |
| 67 | + {%- if method.type and method.type !== "void" -%} |
| 68 | + <thead> |
| 69 | + <tr class="docs-api-method-returns-header-row"> |
| 70 | + <th colspan="2" class="docs-api-method-returns-header-cell">Returns</th> |
| 71 | + </tr> |
| 72 | + </thead> |
| 73 | + <tr> |
| 74 | + <td class="docs-api-method-returns-type-cell"> |
| 75 | + <code class="docs-api-method-returns-type">{$ method.type $}</code> |
| 76 | + </td> |
| 77 | + <td class="docs-api-method-returns-description-cell"> |
| 78 | + <p class="docs-api-method-returns-description"> |
| 79 | + {$ method.returns.description | marked | safe $} |
| 80 | + </p> |
| 81 | + </td> |
64 | 82 | </tr> |
65 | | - </thead> |
66 | | - <tr> |
67 | | - <td class="docs-api-method-returns-type-cell"> |
68 | | - <code class="docs-api-method-returns-type">{$ method.type $}</code> |
69 | | - </td> |
70 | | - <td class="docs-api-method-returns-description-cell"> |
71 | | - <p class="docs-api-method-returns-description"> |
72 | | - {$ method.returns.description | marked | safe $} |
73 | | - </p> |
74 | | - </td> |
75 | | - </tr> |
76 | | - {%- endif -%} |
77 | | -</table> |
| 83 | + {%- endif -%} |
| 84 | + </table> |
| 85 | +</div> |
0 commit comments