import { TooltipsContainer } from '../../../components/mixins/tooltips-mixin';
export default class Action extends React.Component {
+ static propTypes = {
+ showInternal: React.PropTypes.bool
+ };
+
state = {
showParams: false,
showResponse: false
</ul>
)}
- {showParams && action.params && <Params params={action.params}/>}
+ {showParams && action.params && <Params params={action.params} showInternal={this.props.showInternal}/>}
{showResponse && action.hasResponseExample && <ResponseExample domain={domain} action={action}/>}
</div>
import InternalBadge from './InternalBadge';
import DeprecatedBadge from './DeprecatedBadge';
-export default function Params ({ params }) {
+export default function Params ({ params, showInternal }) {
+ const displayedParameters = showInternal ? params : params.filter(p => !p.internal);
+
return (
<div className="web-api-params">
<table>
<tbody>
- {params.map(param => (
+ {displayedParameters.map(param => (
<tr key={param.key}>
<td style={{ width: 180 }}>
<code>{param.key}</code>