-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: フォーム一覧の表示画面でフォームが無いときに画面が崩れるのを修正
- Loading branch information
Showing
4 changed files
with
89 additions
and
70 deletions.
There are no files selected for viewing
23 changes: 23 additions & 0 deletions
23
src/app/(authed)/admin/forms/_components/FormCreateButton.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,23 @@ | ||
import { Add } from '@mui/icons-material'; | ||
import Button from '@mui/material/Button'; | ||
|
||
const FormCreateButton = () => { | ||
return ( | ||
<Button | ||
variant="contained" | ||
startIcon={<Add />} | ||
href="/admin/forms/create" | ||
sx={{ | ||
width: '97px', | ||
height: '36px', | ||
boxShadow: | ||
'0px 3px 5px -1px rgba(0, 0, 0, 0.2), 0px 6px 10px rgba(0, 0, 0, 0.14), 0px 1px 18px rgba(0, 0, 0, 0.12)', | ||
borderRadius: '64px', | ||
}} | ||
> | ||
NEW | ||
</Button> | ||
); | ||
}; | ||
|
||
export default FormCreateButton; |
46 changes: 46 additions & 0 deletions
46
src/app/(authed)/admin/forms/_components/FormTagFilter.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 Autocomplete from '@mui/material/Autocomplete'; | ||
import Box from '@mui/material/Box'; | ||
import Chip from '@mui/material/Chip'; | ||
import TextField from '@mui/material/TextField'; | ||
|
||
const FormTagFilter = () => { | ||
return ( | ||
<Autocomplete | ||
multiple | ||
id="filter-forms" | ||
options={['Open', 'Closed']} | ||
getOptionLabel={(option) => option} | ||
defaultValue={['Open']} | ||
renderTags={(value: readonly string[], getTagProps) => | ||
value.map((option: string, index: number) => ( | ||
<Chip | ||
label={option} | ||
sx={{ background: '#FFFFFF29' }} | ||
{...getTagProps({ index })} | ||
key={index} | ||
/> | ||
)) | ||
} | ||
renderOption={(props, option) => { | ||
return ( | ||
<Box component="span" {...props} style={{ color: 'black' }}> | ||
{option} | ||
</Box> | ||
); | ||
}} | ||
renderInput={(params) => ( | ||
// @ts-expect-error (解決方法がよくわからないのでとりあえずignoreする) | ||
// FIXME: あとで調べる | ||
<TextField | ||
{...params} | ||
variant="standard" | ||
label="Filter" | ||
sx={{ borderBottom: '1px solid #FFFFFF6B' }} | ||
InputLabelProps={{ style: { color: '#FFFFFF80' } }} | ||
/> | ||
)} | ||
/> | ||
); | ||
}; | ||
|
||
export default FormTagFilter; |
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