-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Criando estrutura de modal para criação de consultas
- Loading branch information
1 parent
484290e
commit a385021
Showing
19 changed files
with
468 additions
and
146 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
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
43 changes: 43 additions & 0 deletions
43
src/modules/secretary/components/Schedule/CreateAppointmentModal/index.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,43 @@ | ||
import React, { useState } from 'react'; | ||
|
||
import { Container, NameTextField } from './styles'; | ||
|
||
const CreateAppointmentModal: React.FC = () => { | ||
const mockVal = (str: string, repeat: number = 1) => { | ||
return { | ||
value: str.repeat(repeat), | ||
}; | ||
}; | ||
|
||
const [value, setValue] = useState(''); | ||
const [options, setOptions] = useState<{ value: string }[]>([]); | ||
const onSearch = (searchText: string) => { | ||
setOptions( | ||
!searchText | ||
? [] | ||
: [mockVal(searchText), mockVal(searchText, 2), mockVal(searchText, 3)], | ||
); | ||
}; | ||
const onSelect = (data: string) => { | ||
console.log('onSelect', data); | ||
}; | ||
const onChange = (data: string) => { | ||
setValue(data); | ||
}; | ||
|
||
return ( | ||
<Container> | ||
<NameTextField | ||
value={value} | ||
options={options} | ||
style={{ width: 200 }} | ||
onSelect={onSelect} | ||
onSearch={onSearch} | ||
onChange={onChange} | ||
placeholder="control mode" | ||
/> | ||
</Container> | ||
); | ||
}; | ||
|
||
export default CreateAppointmentModal; |
13 changes: 13 additions & 0 deletions
13
src/modules/secretary/components/Schedule/CreateAppointmentModal/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,13 @@ | ||
import { AutoComplete } from 'antd'; | ||
import styled from 'styled-components'; | ||
|
||
export const Container = styled.div` | ||
width: 100%; | ||
padding: 40px; | ||
> .ant-select { | ||
width: 100% !important; | ||
} | ||
`; | ||
|
||
export const NameTextField = styled(AutoComplete)``; |
40 changes: 40 additions & 0 deletions
40
src/modules/secretary/components/Schedule/DropdownMenu/index.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,40 @@ | ||
import { Menu } from 'antd'; | ||
import React from 'react'; | ||
|
||
// import { Container } from './styles'; | ||
|
||
const DropdownMenu = () => { | ||
return ( | ||
<Menu> | ||
<Menu.Item> | ||
<a | ||
target="_blank" | ||
rel="noopener noreferrer" | ||
href="http://www.alipay.com/" | ||
> | ||
1st menu item | ||
</a> | ||
</Menu.Item> | ||
<Menu.Item> | ||
<a | ||
target="_blank" | ||
rel="noopener noreferrer" | ||
href="http://www.taobao.com/" | ||
> | ||
2nd menu item | ||
</a> | ||
</Menu.Item> | ||
<Menu.Item> | ||
<a | ||
target="_blank" | ||
rel="noopener noreferrer" | ||
href="http://www.tmall.com/" | ||
> | ||
3rd menu item | ||
</a> | ||
</Menu.Item> | ||
</Menu> | ||
); | ||
}; | ||
|
||
export default DropdownMenu; |
3 changes: 3 additions & 0 deletions
3
src/modules/secretary/components/Schedule/DropdownMenu/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,3 @@ | ||
import styled from 'styled-components'; | ||
|
||
export const Container = styled.div``; |
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
Oops, something went wrong.