-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
148 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,3 +6,7 @@ This generator creates a module using the | |
--- | ||
|
||
- new (General case) | ||
|
||
### Run | ||
|
||
`hygen fsd-module [method]` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { SignInModalTemplate } from './ui/sign-in-modal-template' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export const getFormItemRules = () => [{ required: true, min: 6, max: 14 }] |
26 changes: 26 additions & 0 deletions
26
apps/client/src/entities/sign-in-modal-template/ui/sign-in-modal-template.styles.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { Form } from 'antd' | ||
import styled from 'styled-components' | ||
|
||
import { ColorButton } from '$/client-shared' | ||
import { wh } from '$/styles' | ||
|
||
export const SignInModalStyles = styled(Form)` | ||
width: 84%; | ||
margin: 0 auto; | ||
` | ||
|
||
export const SubmitButton = styled(ColorButton)` | ||
height: 40px; | ||
width: 100%; | ||
cursor: pointer; | ||
font-size: ${({ theme }) => theme.fz7}; | ||
margin: 0 auto; | ||
margin-top: 80px; | ||
display: block; | ||
` | ||
|
||
export const LogoWrapper = styled.img` | ||
${wh('68px', '92px')} | ||
margin: 10px auto; | ||
display: block; | ||
` |
46 changes: 46 additions & 0 deletions
46
apps/client/src/entities/sign-in-modal-template/ui/sign-in-modal-template.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
import { Form, Input } from 'antd' | ||
|
||
import { getFormItemRules } from '../lib/helpers' | ||
|
||
import { | ||
LogoWrapper, | ||
SignInModalStyles, | ||
SubmitButton | ||
} from './sign-in-modal-template.styles' | ||
|
||
import { Logo } from '$/assets' | ||
import { ModalTitle } from '$/client-shared' | ||
|
||
interface SignInModalTemplateProps<T> { | ||
onSubmit: (data: T) => void | ||
} | ||
|
||
export const SignInModalTemplate = <T,>({ | ||
onSubmit | ||
}: SignInModalTemplateProps<T>) => { | ||
return ( | ||
<SignInModalStyles | ||
name="sign-in-form" | ||
autoComplete="off" | ||
onFinish={onSubmit}> | ||
<LogoWrapper src={Logo} /> | ||
<ModalTitle>CodeGear</ModalTitle> | ||
|
||
<Form.Item name="username" rules={getFormItemRules()}> | ||
<Input placeholder="Username" size="large" /> | ||
</Form.Item> | ||
|
||
<Form.Item name="password" rules={getFormItemRules()}> | ||
<Input.Password | ||
placeholder="Password" | ||
size="large" | ||
style={{ marginTop: '10px' }} | ||
/> | ||
</Form.Item> | ||
|
||
<SubmitButton override="#38a886" type="primary" htmlType="submit"> | ||
Sign In | ||
</SubmitButton> | ||
</SignInModalStyles> | ||
) | ||
} |
File renamed without changes.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
export interface SignInForm { | ||
username: string | ||
password: string | ||
} |
3 changes: 0 additions & 3 deletions
3
apps/client/src/widgets/sign-in-modal/ui/sign-in-modal.styles.ts
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { default as Logo } from './logo.png' |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
export { default as ColorButton } from './color-button/color-button' | ||
export { Modal } from './modal' | ||
export { Modal, ModalSeparator, ModalTitle } from './modal' | ||
export { Popover } from './popover' | ||
export { Select } from './select/select' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
export { default as Modal } from './ui/modal' | ||
export { ModalSeparator, ModalTitle } from './ui/modal.styles' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters