Sha256: acc6083d739e73a1be658c15c7fe8d2a5bc7569c1521acfd6704c0918108ce75

Contents?: true

Size: 361 Bytes

Versions: 24

Compression:

Stored size: 361 Bytes

Contents

import React from 'react';

// TODO: extract to core
const withProtectedView = (
  ProtectedComponent,
  ProtectionComponent,
  protectionFn,
  extraProtectionProps = {}
) => props =>
  protectionFn(props) ? (
    <ProtectedComponent {...props} />
  ) : (
    <ProtectionComponent {...props} {...extraProtectionProps} />
  );

export default withProtectedView;

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
foreman_templates-10.0.4 webpack/withProtectedView.js
foreman_templates-10.0.3 webpack/withProtectedView.js
foreman_templates-10.0.2 webpack/withProtectedView.js
foreman_templates-10.0.1 webpack/withProtectedView.js
foreman_templates-10.0.0 webpack/withProtectedView.js
foreman_templates-9.5.1 webpack/withProtectedView.js
foreman_templates-9.5.0 webpack/withProtectedView.js
foreman_templates-9.3.3 webpack/withProtectedView.js
foreman_templates-9.3.2 webpack/withProtectedView.js
foreman_templates-9.3.1 webpack/withProtectedView.js
foreman_templates-9.4.0 webpack/withProtectedView.js
foreman_templates-9.3.0 webpack/withProtectedView.js
foreman_templates-9.2.0 webpack/withProtectedView.js
foreman_templates-9.1.0 webpack/withProtectedView.js
foreman_templates-9.0.2 webpack/withProtectedView.js
foreman_templates-9.0.1 webpack/withProtectedView.js
foreman_templates-9.0.0 webpack/withProtectedView.js
foreman_templates-7.0.7 webpack/withProtectedView.js
foreman_templates-8.0.0 webpack/withProtectedView.js
foreman_templates-7.0.6 webpack/withProtectedView.js