Просмотр исходного кода

impl NotAvailableForNow component

Taichi Masuyama 3 лет назад
Родитель
Сommit
3f63f58b0f
1 измененных файлов с 27 добавлено и 0 удалено
  1. 27 0
      packages/app/src/components/NotAvailableForNow.tsx

+ 27 - 0
packages/app/src/components/NotAvailableForNow.tsx

@@ -0,0 +1,27 @@
+import React from 'react';
+
+import { useTranslation } from 'next-i18next';
+
+import { NotAvailable } from './NotAvailable';
+
+
+type NotAvailableForNowProps = {
+  children: JSX.Element
+}
+
+export const NotAvailableForNow = React.memo(({ children }: NotAvailableForNowProps): JSX.Element => {
+  const { t } = useTranslation();
+
+  const title = t('Not available for now');
+
+  return (
+    <NotAvailable
+      isDisabled
+      title={title}
+      classNamePrefix="grw-not-available-for-now"
+    >
+      {children}
+    </NotAvailable>
+  );
+});
+NotAvailableForNow.displayName = 'NotAvailableForNow';