Skip to content

Commit

Permalink
feat: component Keyboard imported from bricks
Browse files Browse the repository at this point in the history
  • Loading branch information
nyet-ty committed Sep 22, 2023
1 parent d7ba636 commit 76068ec
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 98 deletions.
3 changes: 1 addition & 2 deletions src/components/CriteriaForm/CriteriaForm.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { useState, useCallback, forwardRef, ReactEventHandler, useRef, useEffect } from 'react';
import styled from 'styled-components';
import { zodResolver } from '@hookform/resolvers/zod';
import { Button, FormInput, TableRow, TableCell, Popup } from '@taskany/bricks';
import { Button, FormInput, TableRow, TableCell, Popup, Keyboard } from '@taskany/bricks';
import { IconPlusCircleOutline, IconTargetOutline } from '@taskany/icons';
import { gray7, gray8 } from '@taskany/colors';
import { Controller, useForm } from 'react-hook-form';
Expand All @@ -12,7 +12,6 @@ import { InlineTrigger } from '../InlineTrigger';
import { criteriaSchema, updateCriteriaSchema } from '../../schema/criteria';
import { GoalSuggest } from '../GoalSuggest';
import { InlineForm } from '../InlineForm';
import { Keyboard } from '../Keyboard';
import { Tip } from '../Tip';

import { tr } from './CriteriaForm.i18n';
Expand Down
3 changes: 1 addition & 2 deletions src/components/GoalCreateForm/GoalCreateForm.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
import { useCallback, useState } from 'react';
import styled from 'styled-components';
import { gray9, gray10 } from '@taskany/colors';
import { Button, Dropdown, MenuItem, Text } from '@taskany/bricks';
import { Button, Dropdown, MenuItem, Text, Keyboard } from '@taskany/bricks';
import { IconBulbOnOutline, IconUpSmallSolid, IconDownSmallSolid } from '@taskany/icons';

import { useRouter } from '../../hooks/router';
import { usePageContext } from '../../hooks/usePageContext';
import { useLocalStorage } from '../../hooks/useLocalStorage';
import { dispatchModalEvent, ModalEvent } from '../../utils/dispatchModal';
import { Tip } from '../Tip';
import { Keyboard } from '../Keyboard';
import { GoalForm } from '../GoalForm/GoalForm';
import { trpc } from '../../utils/trpcClient';
import { GoalCommon, goalCommonSchema } from '../../schema/goal';
Expand Down
3 changes: 1 addition & 2 deletions src/components/GoalEditForm/GoalEditForm.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useMemo, useState } from 'react';
import { Button } from '@taskany/bricks';
import { Button, Keyboard } from '@taskany/bricks';
import { gray10 } from '@taskany/colors';
import { IconBulbOnOutline } from '@taskany/icons';

Expand All @@ -8,7 +8,6 @@ import { GoalUpdateReturnType, GoalByIdReturnType } from '../../../trpc/inferred
import { GoalUpdate, goalUpdateSchema } from '../../schema/goal';
import { ModalEvent, dispatchModalEvent } from '../../utils/dispatchModal';
import { Tip } from '../Tip';
import { Keyboard } from '../Keyboard';
import { trpc } from '../../utils/trpcClient';
import { useGoalResource } from '../../hooks/useGoalResource';
import { getDateStringFromEstimate } from '../../utils/dateTime';
Expand Down
3 changes: 1 addition & 2 deletions src/components/HotkeysModal/HotkeysModal.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import React, { useState, useCallback, useEffect, useRef } from 'react';
import styled from 'styled-components';
import { gray8, gapM, gray9, gapS } from '@taskany/colors';
import { Modal, ModalContent, Text } from '@taskany/bricks';
import { Modal, ModalContent, Text, Keyboard } from '@taskany/bricks';

import { isEventTargetInputOrTextArea } from '../../utils/hotkeys';
import { Keyboard } from '../Keyboard';

import { tr } from './HotkeysModal.i18n';

Expand Down
86 changes: 0 additions & 86 deletions src/components/Keyboard.tsx

This file was deleted.

2 changes: 1 addition & 1 deletion src/components/ProjectCreateForm/ProjectCreateForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import {
FormInput,
ModalContent,
nullable,
Keyboard,
} from '@taskany/bricks';
import { IconBulbOnSolid } from '@taskany/icons';

Expand All @@ -24,7 +25,6 @@ import { useDebouncedEffect } from '../../hooks/useDebouncedEffect';
import { useRouter } from '../../hooks/router';
import { useProjectResource } from '../../hooks/useProjectResource';
import { Tip } from '../Tip';
import { Keyboard } from '../Keyboard';
import { FlowComboBox } from '../FlowComboBox';
import { trpc } from '../../utils/trpcClient';
import { ProjectCreate, projectCreateSchema } from '../../schema/project';
Expand Down
2 changes: 1 addition & 1 deletion src/components/UserInviteForm/UserInviteForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ import {
Tag,
KeyCode,
TagCleanButton,
Keyboard,
} from '@taskany/bricks';
import { IconBulbOnOutline } from '@taskany/icons';

import { trpc } from '../../utils/trpcClient';
import { Tip } from '../Tip';
import { Keyboard } from '../Keyboard';
import { notifyPromise } from '../../utils/notifyPromise';
import { HelpButton } from '../HelpButton/HelpButton';

Expand Down
13 changes: 11 additions & 2 deletions src/components/UserSettingsPage/UserSettingsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,17 @@ import { zodResolver } from '@hookform/resolvers/zod';
import { useTheme } from 'next-themes';
import { signOut } from 'next-auth/react';
import { gray10 } from '@taskany/colors';
import { Button, Fieldset, Form, FormInput, FormAction, FormActions, FormRadio, FormRadioInput } from '@taskany/bricks';
import {
Button,
Fieldset,
Form,
FormInput,
FormAction,
FormActions,
FormRadio,
FormRadioInput,
Keyboard,
} from '@taskany/bricks';
import { IconBulbOnOutline } from '@taskany/icons';
import { z } from 'zod';

Expand All @@ -16,7 +26,6 @@ import { trpc } from '../../utils/trpcClient';
import { Page } from '../Page';
import { PageSep } from '../PageSep';
import { Tip } from '../Tip';
import { Keyboard } from '../Keyboard';
import { CommonHeader } from '../CommonHeader';
import { SettingsCard, SettingsContent } from '../SettingsContent';
import { UpdateUser, updateUserSchema } from '../../schema/user';
Expand Down

0 comments on commit 76068ec

Please sign in to comment.