Skip to content

Commit

Permalink
Improve
Browse files Browse the repository at this point in the history
  • Loading branch information
veronikaa-kuznetsova committed Jun 6, 2024
1 parent c5ce701 commit 46fa0aa
Show file tree
Hide file tree
Showing 13 changed files with 41 additions and 28 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 0 additions & 22 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@
"eslint-plugin-react-hooks": "^4.3.0",
"file-loader": "^6.2.0",
"html-webpack-plugin": "^5.5.0",
"husky": "^7.0.0",
"identity-obj-proxy": "^3.0.0",
"jest": "^27.5.1",
"json-server": "^0.17.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@
.loginBtn {
margin-top: 15px;
margin-left: auto;
}
}
16 changes: 16 additions & 0 deletions src/features/AuthByUsername/ui/LoginForm/LoginForm.stories.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import React from 'react';
import { ComponentMeta, ComponentStory } from '@storybook/react';
import { LoginForm } from './LoginForm';

export default {
title: 'features/LoginForm',
component: LoginForm,
argTypes: {
backgroundColor: { control: 'color' },
},
} as ComponentMeta<typeof LoginForm>;

const Template: ComponentStory<typeof LoginForm> = (args) => <LoginForm {...args} />;

Check warning on line 13 in src/features/AuthByUsername/ui/LoginForm/LoginForm.stories.tsx

View workflow job for this annotation

GitHub Actions / pipeline (17.x)

Prop spreading is forbidden

export const Primary = Template.bind({});
Primary.args = {};
Empty file.
3 changes: 1 addition & 2 deletions src/features/AuthByUsername/ui/LoginModal/LoginModal.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { classNames } from 'shared/lib/classNames/classNames';
import { Modal } from 'shared/ui/Modal/Modal';
import cls from './LoginModal.module.scss';
import { LoginForm } from '../LoginForm/LoginForm';

interface LoginModalProps {
Expand All @@ -11,7 +10,7 @@ interface LoginModalProps {

export const LoginModal = ({ className, isOpen, onClose }: LoginModalProps) => (
<Modal
className={classNames(cls.LoginModal, {}, [className])}
className={classNames('', {}, [className])}
isOpen={isOpen}
onClose={onClose}
lazy
Expand Down
2 changes: 1 addition & 1 deletion src/pages/MainPage/ui/MainPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const MainPage = () => {
<div>
{t('main_page')}
<Input
placeholder="Введите текст"
placeholder=""
value={value}
onChange={onChange}
/>
Expand Down
4 changes: 3 additions & 1 deletion src/shared/ui/Input/Input.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,12 @@
0% {
opacity: 0;
}

50% {
opacity: 0.01;
}

100% {
opacity: 1;
}
}
}
19 changes: 19 additions & 0 deletions src/shared/ui/Input/Input.stories.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import React from 'react';
import { ComponentMeta, ComponentStory } from '@storybook/react';
import { Input } from 'shared/ui/Input/Input';

export default {
title: 'shared/Input',
component: Input,
argTypes: {
backgroundColor: { control: 'color' },
},
} as ComponentMeta<typeof Input>;

const Template: ComponentStory<typeof Input> = (args) => <Input {...args} />;

export const Primary = Template.bind({});
Primary.args = {
placeholder: 'Type text',
value: 'Введите текст',
};

0 comments on commit 46fa0aa

Please sign in to comment.