Skip to content
This repository has been archived by the owner on Feb 7, 2019. It is now read-only.

Commit

Permalink
Update: The noTryIt attribute is now handled by the Polymer data bi…
Browse files Browse the repository at this point in the history
…nding instead of CSS properties.
  • Loading branch information
jarrodek committed Jun 26, 2017
1 parent 8e8823e commit e174bec
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions raml-docs-method-viewer.html
Original file line number Diff line number Diff line change
Expand Up @@ -170,10 +170,6 @@
@apply(--action-button-hover);
}

:host([no-try-it]) .action {
display: none !important;
}

.bottom.action {
@apply(--layout-horizontal);
@apply(--layout-end-justified);
Expand Down Expand Up @@ -267,9 +263,11 @@ <h1 class="title">
<span hidden$="[[!parentName]]">:</span>
<span class="method-name">[[methodName]]</span>
</h1>
<div class="action">
<paper-button class="action-button" on-tap="_tryIt">Try it</paper-button>
</div>
<template is="dom-if" if="[[!noTryIt]]">
<div class="action">
<paper-button class="action-button" on-tap="_tryIt">Try it</paper-button>
</div>
</template>
</div>

<template is="dom-if" if="[[hasTraits]]">
Expand Down Expand Up @@ -351,9 +349,12 @@ <h2>Response</h2>
<raml-docs-response-panel has-responses="{{hasResponses}}" responses="[[raml.responses]]"></raml-docs-response-panel>
</section>

<div class="bottom action">
<paper-button class="action-button" on-tap="_tryIt">Try it</paper-button>
</div>
<template is="dom-if" if="[[!noTryIt]]">
<div class="bottom action">
<paper-button class="action-button" on-tap="_tryIt">Try it</paper-button>
</div>
</template>

</section>
</template>
<script>
Expand Down Expand Up @@ -417,7 +418,7 @@ <h2>Response</h2>
// If set then the `tryit` button will be hidden.
noTryIt: {
type: Boolean,
reflectToAttribute: true
value: false
},
/**
* If set it will renders the view in the narrow layout.
Expand Down

0 comments on commit e174bec

Please sign in to comment.