@@ -10,6 +10,8 @@ import useWebsocketEvent from '@/plugins/useWebsocketEvent';
1010import { ServerContext } from '@/state/server' ;
1111import BackupContextMenu from '@/components/server/backups/BackupContextMenu' ;
1212import { faEllipsisH } from '@fortawesome/free-solid-svg-icons/faEllipsisH' ;
13+ import tw from 'twin.macro' ;
14+ import GreyRowBox from '@/components/elements/GreyRowBox' ;
1315
1416interface Props {
1517 backup : ServerBackup ;
@@ -34,45 +36,45 @@ export default ({ backup, className }: Props) => {
3436 } ) ;
3537
3638 return (
37- < div className = { `grey-row-box flex items-center $ {className } ` } >
38- < div className = { ' mr-4' } >
39+ < GreyRowBox css = { tw ` flex items-center` } className = { className } >
40+ < div css = { tw ` mr-4` } >
3941 { backup . completedAt ?
40- < FontAwesomeIcon icon = { faArchive } className = { ' text-neutral-300' } />
42+ < FontAwesomeIcon icon = { faArchive } css = { tw ` text-neutral-300` } />
4143 :
4244 < Spinner size = { 'small' } />
4345 }
4446 </ div >
45- < div className = { ' flex-1' } >
46- < p className = { ' text-sm mb-1' } >
47+ < div css = { tw ` flex-1` } >
48+ < p css = { tw ` text-sm mb-1` } >
4749 { backup . name }
4850 { backup . completedAt &&
49- < span className = { ' ml-3 text-neutral-300 text-xs font-thin' } > { bytesToHuman ( backup . bytes ) } </ span >
51+ < span css = { tw ` ml-3 text-neutral-300 text-xs font-thin` } > { bytesToHuman ( backup . bytes ) } </ span >
5052 }
5153 </ p >
52- < p className = { ' text-xs text-neutral-400 font-mono' } >
54+ < p css = { tw ` text-xs text-neutral-400 font-mono` } >
5355 { backup . uuid }
5456 </ p >
5557 </ div >
56- < div className = { ' ml-8 text-center' } >
58+ < div css = { tw ` ml-8 text-center` } >
5759 < p
58- title = { format ( backup . createdAt , 'ddd, MMMM Do, YYYY HH:mm:ss Z ' ) }
59- className = { ' text-sm' }
60+ title = { format ( backup . createdAt , 'ddd, MMMM do, yyyy HH:mm:ss' ) }
61+ css = { tw ` text-sm` }
6062 >
6163 { formatDistanceToNow ( backup . createdAt , { includeSeconds : true , addSuffix : true } ) }
6264 </ p >
63- < p className = { ' text-2xs text-neutral-500 uppercase mt-1' } > Created</ p >
65+ < p css = { tw ` text-2xs text-neutral-500 uppercase mt-1` } > Created</ p >
6466 </ div >
6567 < Can action = { 'backup.download' } >
66- < div className = { ' ml-6' } style = { { marginRight : '-0.5rem' } } >
68+ < div css = { tw ` ml-6` } style = { { marginRight : '-0.5rem' } } >
6769 { ! backup . completedAt ?
68- < div className = { ' p-2 invisible' } >
70+ < div css = { tw ` p-2 invisible` } >
6971 < FontAwesomeIcon icon = { faEllipsisH } />
7072 </ div >
7173 :
7274 < BackupContextMenu backup = { backup } />
7375 }
7476 </ div >
7577 </ Can >
76- </ div >
78+ </ GreyRowBox >
7779 ) ;
7880} ;
0 commit comments