Add end adornment icon to refresh the room uuid() (#62)
* Add end adornment icon to refresh room uuid() * Make mobile compatible
This commit is contained in:
parent
8947bace94
commit
237fc0e6df
@ -9,6 +9,7 @@ import Divider from '@mui/material/Divider'
|
|||||||
import IconButton from '@mui/material/IconButton'
|
import IconButton from '@mui/material/IconButton'
|
||||||
import MuiLink from '@mui/material/Link'
|
import MuiLink from '@mui/material/Link'
|
||||||
import GitHubIcon from '@mui/icons-material/GitHub'
|
import GitHubIcon from '@mui/icons-material/GitHub'
|
||||||
|
import Cached from '@mui/icons-material/Cached'
|
||||||
import Tooltip from '@mui/material/Tooltip'
|
import Tooltip from '@mui/material/Tooltip'
|
||||||
import { v4 as uuid } from 'uuid'
|
import { v4 as uuid } from 'uuid'
|
||||||
|
|
||||||
@ -69,6 +70,18 @@ export function Home({ userId }: HomeProps) {
|
|||||||
variant="outlined"
|
variant="outlined"
|
||||||
value={roomName}
|
value={roomName}
|
||||||
onChange={handleRoomNameChange}
|
onChange={handleRoomNameChange}
|
||||||
|
InputProps={{
|
||||||
|
endAdornment: (
|
||||||
|
<IconButton
|
||||||
|
aria-label="Regenerate room id"
|
||||||
|
onClick={() => setRoomName(uuid())}
|
||||||
|
size="small"
|
||||||
|
>
|
||||||
|
<Cached />
|
||||||
|
</IconButton>
|
||||||
|
),
|
||||||
|
sx: { fontSize: { xs: '0.9rem', sm: '1rem' } },
|
||||||
|
}}
|
||||||
size="medium"
|
size="medium"
|
||||||
/>
|
/>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
|
Loading…
Reference in New Issue
Block a user