How to use where clause in Knex
Create refunds with Stripe
Load HTML with Cheerio
How to send POST request with Axios
Find intersection of array in Lodash
Powered by Official white Bloop logo with a period

Terms / Privacy / Search / Support

  • import angular from 'angular';
    import 'angular-translate';
    import '@ovh-ux/ui-kit';
    
    import component from './notebook-attach.component';
    
    const moduleName = 'ovhManagerPciProjectNotebooksNotebookAttach';
    
    angular
      .module(moduleName, ['oui', 'pascalprecht.translate'])
      .component('notebookAttach', component)
      .run(/* @ngTranslationsInject:json ./translations */);
    
    export default moduleName;
    
    <pre class="typing-tooltip"><code data-language="javascript" class="language-javascript"><span class="token keyword">import</span> angular</code></pre>
    /ovh/manager BSD-3-Clause
    0
  • import angular from 'angular';
    import '@ovh-ux/ng-translate-async-loader';
    import '@ovh-ux/ng-ovh-cloud-universe-components';
    import 'angular-translate';
    import '@ovh-ux/ui-kit';
    
    import component from './component';
    
    const moduleName = 'ovhManagerPciComponentsProjectBillingResourceUsage';
    
    angular
      .module(moduleName, [
        'ngOvhCloudUniverseComponents',
        'ngTranslateAsyncLoader',
        'oui',
        'pascalprecht.translate',
      ])
      .component(component.name, component)
      .run(/* @ngTranslationsInject:json ./translations */);
    
    export default moduleName;
    
    <pre class="typing-tooltip"><code data-language="javascript" class="language-javascript"><span class="token keyword">import</span> angular</code></pre>
    /ovh/manager BSD-3-Clause
    0
  • import angular from 'angular';
    import 'angular-translate';
    
    import component from './dedicatedCloud-user-rights-edit.component';
    
    const moduleName = 'ovhManagerDedicatedCloudUserRightsEdit';
    
    angular
      .module(moduleName, [])
      .component('dedicatedCloudUserRightsEdit', component)
      .run(/* @ngTranslationsInject:json ./translations */);
    
    export default moduleName;
    
    <pre class="typing-tooltip"><code data-language="javascript" class="language-javascript"><span class="token keyword">import</span> angular</code></pre>
    /ovh/manager BSD-3-Clause
    0
  • import angular from 'angular';
    import 'angular-translate';
    import '@ovh-ux/ui-kit';
    
    import component from './component';
    
    const moduleName = 'ovhManagerAnthosComponentsOrderPublicIp';
    
    angular
      .module(moduleName, ['pascalprecht.translate', 'oui'])
      .component('orderPublicIp', component)
      .run(/* @ngTranslationsInject:json ./translations */);
    
    export default moduleName;
    
    <pre class="typing-tooltip"><code data-language="javascript" class="language-javascript"><span class="token keyword">import</span> angular</code></pre>
    /ovh/manager BSD-3-Clause
    0
  • import angular from 'angular';
    import '@ovh-ux/ng-translate-async-loader';
    import '@uirouter/angularjs';
    import 'angular-translate';
    import '@ovh-ux/ui-kit';
    import 'ovh-api-services';
    
    import component from './volume-edit.component';
    
    const moduleName = 'ovhManagerPciStoragesBlocksBlockVolumeEdit';
    
    angular
      .module(moduleName, [
        'oui',
        'ngTranslateAsyncLoader',
        'ovh-api-services',
        'pascalprecht.translate',
        'ui.router',
      ])
      .component('pciProjectStorageVolumeEdit', component)
      .run(/* @ngTranslationsInject:json ./translations */);
    
    export default moduleName;
    
    <pre class="typing-tooltip"><code data-language="javascript" class="language-javascript"><span class="token keyword">import</span> angular</code></pre>
    /ovh/manager BSD-3-Clause
    0
  • function App() {
      const [inProp, setInProp] = useState(false);
      return (
        <div>
          <CSSTransition in={inProp} timeout={200} classNames="my-node">
            <div>
              {"I'll receive my-node-* classes"}
            </div>
          </CSSTransition>
          <button type="button" onClick={() => setInProp(true)}>
            Click to Enter
          </button>
        </div>
      );
    }
    Docs
    0
  • function App() {
     const [state, setState] = useState(false);
     return (
       <SwitchTransition>
         <CSSTransition
           key={state ? "Goodbye, world!" : "Hello, world!"}
           addEndListener={(node, done) => node.addEventListener("transitionend", done, false)}
           classNames='fade'
         >
           <button onClick={() => setState(state => !state)}>
             {state ? "Goodbye, world!" : "Hello, world!"}
           </button>
         </CSSTransition>
       </SwitchTransition>
     );
    }
    Docs
    0
  • import { Transition } from 'react-transition-group';
    
    const duration = 300;
    
    const defaultStyle = {
      transition: `opacity ${duration}ms ease-in-out`,
      opacity: 0,
    }
    
    const transitionStyles = {
      entering: { opacity: 1 },
      entered:  { opacity: 1 },
      exiting:  { opacity: 0 },
      exited:  { opacity: 0 },
    };
    
    const Fade = ({ in: inProp }) => (
      <Transition in={inProp} timeout={duration}>
        {state => (
          <div style={{
            ...defaultStyle,
            ...transitionStyles[state]
          }}>
            I'm a fade Transition!
          </div>
        )}
      </Transition>
    );
    Docs
    0
  • function App() {
      const [inProp, setInProp] = useState(false);
      return (
        <div>
          <Transition in={inProp} timeout={500}>
            {state => (
              // ...
            )}
          </Transition>
          <button onClick={() => setInProp(true)}>
            Click to Enter
          </button>
        </div>
      );
    }
    Docs
    0
  • <Transition in={this.state.in} timeout={150}>
      {state => (
        <MyComponent className={`fade fade-${state}`} />
      )}
    </Transition>
    Docs
    0
  • await render(AppComponent, {
      schemas: [NO_ERRORS_SCHEMA],
    })
    <pre class="typing-tooltip"><code data-language="javascript" class="language-javascript"><span class="token builtin">any</span></code></pre>
    Docs
    0
  • await render(AppComponent, {
      componentProviders: [AppComponentService],
    })
    <pre class="typing-tooltip"><code data-language="javascript" class="language-javascript"><span class="token builtin">any</span></code></pre>
    Docs
    0
  • const {fixture} = await render(AppComponent)
    
    const componentInstance = fixture.componentInstance as AppComponent
    <pre class="typing-tooltip"><code data-language="javascript" class="language-javascript"><span class="token keyword">const</span> fixture<span class="token operator">:</span> <span class="token builtin">any</span></code></pre>
    Docs
    0
  • await render(AppComponent, {
      declarations: [CustomerDetailComponent, ButtonComponent],
    })
    <pre class="typing-tooltip"><code data-language="javascript" class="language-javascript"><span class="token builtin">any</span></code></pre>
    Docs
    0
  • await render(AppComponent, {detectChanges: false})
    <pre class="typing-tooltip"><code data-language="javascript" class="language-javascript"><span class="token builtin">any</span></code></pre>
    Docs
    0
  • import {configure, screen} from '@testing-library/testcafe'
    
    fixture`configure`.clientScripts(
      configure({testIdAttribute: 'data-automation-id'}),
    ).page`http://localhost:13370`
    
    test('supports alternative testIdAttribute', async t => {
      await t.click(screen.getByTestId('image-with-random-alt-tag'))
    })
    
    test('still works after browser page load and reload', async t => {
      await t.click(screen.getByText('Go to Page 2'))
    
      await t.eval(() => location.reload(true))
    
      await t
        .click(screen.getByTestId('page2-thing'))
        .expect(screen.getByText('second page').exists)
        .ok()
    })
    <pre class="typing-tooltip"><code data-language="javascript" class="language-javascript"><span class="token punctuation">(</span>alias<span class="token punctuation">)</span> <span class="token keyword">function</span> <span class="token function">configure</span><span class="token punctuation">(</span><span class="token parameter">options<span class="token operator">:</span> Partial<span class="token operator">&lt;</span>Options<span class="token operator">></span></span><span class="token punctuation">)</span><span class="token operator">:</span> <span class="token punctuation">{</span> content<span class="token operator">:</span> <span class="token builtin">string</span><span class="token punctuation">;</span> <span class="token punctuation">}</span> <span class="token keyword">import</span> configure</code></pre>
    Docs
    0
  • import {within, screen} from '@testing-library/testcafe'
    
    fixture`within`.page`http://localhost:13370`
    
    test('works with getBy* selectors', async t => {
      await t
        .expect(
          within(screen.getByTestId('nested')).getByText('Button Text').exists,
        )
        .ok()
    })
    
    test('works with CSS selector strings', async t => {
      const {getByText} = await within('#nested')
      await t.click(getByText('Button Text')).ok()
    })
    
    test('works on any testcafe selector', async t => {
      const nested = Selector('#nested')
    
      await t.expect(within(nested).getByText('Button Text').exists).ok()
    })
    
    test('works with results from "byAll" query with index - regex', async t => {
      const nestedDivs = screen.getAllByTestId(/nested/)
      await t.expect(nestedDivs.count).eql(2)
    
      await t
        .expect(within(nestedDivs.nth(0)).getByText('Button Text').exists)
        .ok()
        .expect(
          within(nestedDivs.nth(1)).getByText('text only in 2nd nested').exists,
        )
        .ok()
    })
    <pre class="typing-tooltip"><code data-language="javascript" class="language-javascript"><span class="token punctuation">(</span>alias<span class="token punctuation">)</span> <span class="token keyword">function</span> <span class="token function">within</span><span class="token punctuation">(</span><span class="token parameter">selector<span class="token operator">:</span> SelectorArg</span><span class="token punctuation">)</span><span class="token operator">:</span> WithinSelectors <span class="token keyword">import</span> within</code></pre>
    Docs
    0
  • Powered by Official black Bloop logo with a period
    download the IDE extension

    View other examples