From 4a9cf28660ed3b7e02952d02035978d1d4ad3e7e Mon Sep 17 00:00:00 2001
From: Piotr Russ <mail@pruss.it>
Date: Wed, 9 Dec 2020 23:26:30 +0100
Subject: add creator 2nd step & onKeyPress helper

---
 client/src/admin/jsx/MainScreen.jsx | 22 +++++++++++++++++++---
 1 file changed, 19 insertions(+), 3 deletions(-)

(limited to 'client/src/admin/jsx/MainScreen.jsx')

diff --git a/client/src/admin/jsx/MainScreen.jsx b/client/src/admin/jsx/MainScreen.jsx
index ea2def5..8808dc5 100644
--- a/client/src/admin/jsx/MainScreen.jsx
+++ b/client/src/admin/jsx/MainScreen.jsx
@@ -1,5 +1,6 @@
 import React, { Fragment } from 'react';
 import { WithHover, t, goTo } from '../hocs';
+import { onKeyPress } from '../helpers'
 
 const MainScreen = ({ projects }) => (
   <div className="main-screen">
@@ -7,16 +8,31 @@ const MainScreen = ({ projects }) => (
     <div className="main-screen__list">
       { !projects.length && (
         <WithHover message="edit-current-project-hover">
-          <p className="main-screen__item">{ t('edit-current-project') }</p>
+          <p
+            className="main-screen__item"
+            tabIndex="0"
+          >
+            { t('edit-current-project') }
+          </p>
         </WithHover>
       )}
       { !projects.length && (
         <WithHover message="show-saved-projects-hover">
-          <p className="main-screen__item">{ t('show-saved-projects') }</p>
+          <p
+            className="main-screen__item"
+            tabIndex="0"
+          >
+            { t('show-saved-projects') }
+          </p>
         </WithHover>
       )}
       <WithHover message="create-new-project-hover">
-        <p className="main-screen__item" onClick={ goTo('creator') }>
+        <p
+          className="main-screen__item"
+          onClick={ goTo('creator') }
+          onKeyPress={onKeyPress}
+          tabIndex="0"
+        >
           { t('create-new-project') }
         </p>
       </WithHover>
-- 
cgit v1.2.3

