feat: !new robot button

This commit is contained in:
karishmas6
2024-10-10 21:45:09 +05:30
parent 22f9ba2687
commit e670461799

View File

@@ -68,28 +68,32 @@ export const NavBar: React.FC<NavBarProps> = ({ newRecording, recordingName, isR
display: 'flex', display: 'flex',
justifyContent: 'flex-end', justifyContent: 'flex-end',
}}> }}>
<IconButton {
aria-label="new" !isRecording ? (
size={"small"} <IconButton
onClick={handleNewRecording} aria-label="new"
sx={{ size={"small"}
width: isRecording ? '130px' : '140px', onClick={handleNewRecording}
borderRadius: '5px', sx={{
padding: '8px', width: '140px',
background: '#ff00c3', borderRadius: '5px',
color: 'white', padding: '8px',
marginRight: '10px', background: '#ff00c3',
fontFamily: '"Roboto","Helvetica","Arial",sans-serif', color: 'white',
fontWeight: '500', marginRight: '10px',
fontSize: '0.875rem', fontFamily: '"Roboto","Helvetica","Arial",sans-serif',
lineHeight: '1.75', fontWeight: '500',
letterSpacing: '0.02857em', fontSize: '0.875rem',
'&:hover': { color: 'white', backgroundColor: '#ff00c3' } lineHeight: '1.75',
} letterSpacing: '0.02857em',
} '&:hover': { color: 'white', backgroundColor: '#ff00c3' }
> }
<Add sx={{ marginRight: '5px' }} /> {isRecording ? 'New Robot' : 'Create Robot'} }
</IconButton> >
<Add sx={{ marginRight: '5px' }} /> Create Robot
</IconButton>
) : ""
}
{ {
recordingLength > 0 recordingLength > 0
? <SaveRecording fileName={recordingName} /> ? <SaveRecording fileName={recordingName} />