import ResponseExample from './ResponseExample';
import DeprecatedBadge from './DeprecatedBadge';
import InternalBadge from './InternalBadge';
+import { TooltipsContainer } from '../../../components/mixins/tooltips-mixin';
export default class Action extends React.Component {
state = {
return (
<div id={actionKey} className="web-api-action">
- <header className="web-api-action-header">
- <Link
- to={{ pathname: '/' + actionKey }}
- className="spacer-right icon-link"/>
+ <TooltipsContainer>
+ <header className="web-api-action-header">
+ <Link
+ to={{ pathname: '/' + actionKey }}
+ className="spacer-right icon-link"/>
- <h3 className="web-api-action-title">
- {verb} {actionKey}
- </h3>
+ <h3 className="web-api-action-title">
+ {verb} {actionKey}
+ </h3>
- {action.internal && (
- <span className="spacer-left">
+ {action.internal && (
+ <span className="spacer-left">
<InternalBadge/>
</span>
- )}
+ )}
- {action.since && (
- <span className="spacer-left badge">since {action.since}</span>
- )}
+ {action.since && (
+ <span className="spacer-left badge">since {action.since}</span>
+ )}
- {action.deprecatedSince && (
- <span className="spacer-left">
+ {action.deprecatedSince && (
+ <span className="spacer-left">
<DeprecatedBadge since={action.deprecatedSince}/>
</span>
- )}
- </header>
+ )}
+ </header>
+ </TooltipsContainer>
<div
className="web-api-action-description markdown"
return (
<span
className="badge badge-warning"
- title={translate('api_documentation.deprecation_tooltip')}>
+ title={translate('api_documentation.deprecation_tooltip')}
+ data-toggle="tooltip">
{label}
</span>
);
return (
<span
className="badge badge-danger"
- title={translate('api_documentation.internal_tooltip')}>
+ title={translate('api_documentation.internal_tooltip')}
+ data-toggle="tooltip">
internal
</span>
);
import classNames from 'classnames';
import InternalBadge from './InternalBadge';
+import { TooltipsContainer } from '../../../components/mixins/tooltips-mixin';
import { getActionKey } from '../utils';
export default function Menu ({ domains, showInternal, showOnlyDeprecated, searchQuery, splat }) {
return (
<div className="api-documentation-results panel">
- <div className="list-group">
- {filteredDomains.map(domain => (
- <Link
- key={domain.path}
- className={classNames('list-group-item', { 'active': splat.indexOf(domain.path) === 0 })}
- to={domain.path}>
- <h3 className="list-group-item-heading">
- {domain.path}
- {domain.internal && (
- <InternalBadge/>
- )}
- </h3>
- <p className="list-group-item-text">
- {domain.description}
- </p>
- </Link>
- ))}
- </div>
+ <TooltipsContainer>
+ <div className="list-group">
+ {filteredDomains.map(domain => (
+ <Link
+ key={domain.path}
+ className={classNames('list-group-item', { 'active': splat.indexOf(domain.path) === 0 })}
+ to={domain.path}>
+ <h3 className="list-group-item-heading">
+ {domain.path}
+ {domain.internal && (
+ <InternalBadge/>
+ )}
+ </h3>
+ <p className="list-group-item-text">
+ {domain.description}
+ </p>
+ </Link>
+ ))}
+ </div>
+ </TooltipsContainer>
</div>
);
}
import React from 'react';
import Checkbox from '../../../components/shared/checkbox';
+import { TooltipsContainer } from '../../../components/mixins/tooltips-mixin';
import { translate } from '../../../helpers/l10n';
export default class Search extends React.Component {
onChange={this.handleSearch.bind(this)}/>
</div>
- <div className="big-spacer-top">
- <Checkbox
- initiallyChecked={showInternal}
- onCheck={onToggleInternal}/>
- {' '}
- <span
- style={{ cursor: 'pointer' }}
- title={translate('api_documentation.internal_tooltip')}
- onClick={onToggleInternal}>
- Show Internal API
- </span>
- </div>
+ <TooltipsContainer>
+ <div className="big-spacer-top">
+ <Checkbox
+ initiallyChecked={showInternal}
+ onCheck={onToggleInternal}/>
+ {' '}
+ <span
+ style={{ cursor: 'pointer' }}
+ title={translate('api_documentation.internal_tooltip')}
+ onClick={onToggleInternal}>
+ Show Internal API
+ </span>
+ <i
+ className="icon-help spacer-left"
+ title={translate('api_documentation.internal_tooltip')}
+ data-toggle="tooltip"/>
+ </div>
+ </TooltipsContainer>
- <div className="spacer-top">
- <Checkbox
- initiallyChecked={showOnlyDeprecated}
- onCheck={onToggleDeprecated}/>
- {' '}
- <span
- style={{ cursor: 'pointer' }}
- title={translate('api_documentation.deprecation_tooltip')}
- onClick={onToggleDeprecated}>
- Show Only Deprecated API
- </span>
- </div>
+ <TooltipsContainer>
+ <div className="spacer-top">
+ <Checkbox
+ initiallyChecked={showOnlyDeprecated}
+ onCheck={onToggleDeprecated}/>
+ {' '}
+ <span
+ style={{ cursor: 'pointer' }}
+ title={translate('api_documentation.deprecation_tooltip')}
+ onClick={onToggleDeprecated}>
+ Show Only Deprecated API
+ </span>
+ <i
+ className="icon-help spacer-left"
+ title={translate('api_documentation.deprecation_tooltip')}
+ data-toggle="tooltip"/>
+ </div>
+ </TooltipsContainer>
</div>
);
}