11import { FC , Fragment , PropsWithChildren , ReactNode } from 'react'
22import { Trans , useTranslation } from 'react-i18next'
3- import Box from '@mui/material/Box'
43import { RoflAppPolicy } from '../../../oasis-nexus/api'
54import { exhaustedTypeWarning } from '../../../types/errors'
65import { AccountLink } from '../../components/Account/AccountLink'
76import { useRuntimeScope } from '../../hooks/useScopeParam'
8- import { useScreenSize } from '../../hooks/useScreensize'
97import { getOasisAddressFromBase64PublicKey } from '../../utils/helpers'
108
119const StyledBox : FC < PropsWithChildren > = ( { children } ) => {
12- const { isTablet } = useScreenSize ( )
1310 return (
14- < Box
15- sx = { {
16- display : 'flex' ,
17- flexWrap : isTablet ? 'wrap' : 'nowrap' ,
18- textWrap : isTablet ? 'wrap' : 'nowrap' ,
19- gap : 2 ,
20- alignItems : 'center' ,
21- flex : 1 ,
22- overflowX : 'hidden' ,
23- overflowY : 'hidden' ,
24- } }
25- >
11+ < div className = "flex flex-nowrap md:flex-wrap gap-1 items-center flex-1 overflow-x-hidden overflow-y-hidden text-nowrap md:whitespace-normal" >
2612 { children }
27- </ Box >
13+ </ div >
2814 )
2915}
3016
@@ -145,21 +131,9 @@ export const Endorsement: FC<EndorsementProps> = ({ endorsements, groupOp }) =>
145131 case 'and' :
146132 case 'or' :
147133 return (
148- < Box
149- component = { 'div' }
150- sx = { {
151- flex : 1 ,
152- display : 'flex' ,
153- flexDirection : 'column' ,
154- overflowX : 'hidden' ,
155- paddingLeft : '15px' ,
156- borderLeft : '1px solid #000' /* Vertical line of the brace */ ,
157- borderTopLeftRadius : '10px' ,
158- borderBottomLeftRadius : '10px' ,
159- } }
160- >
134+ < div className = "flex-1 flex flex-col overflow-x-hidden pl-4 border-l border-black rounded-tl-lg rounded-bl-lg" >
161135 < Endorsement endorsements = { value } groupOp = { key } />
162- </ Box >
136+ </ div >
163137 )
164138 }
165139 exhaustedTypeWarning ( 'Unknown endorsement' , key )
@@ -185,18 +159,9 @@ export const Endorsement: FC<EndorsementProps> = ({ endorsements, groupOp }) =>
185159 { groupOpLabel [ groupOp ] }
186160 </ span >
187161 ) }
188- < Box
189- sx = { {
190- flex : 1 ,
191- display : 'flex' ,
192- alignItems : 'center' ,
193- flexWrap : 'nowrap' ,
194- overflowX : 'hidden' ,
195- gap : 3 ,
196- } }
197- >
162+ < div className = "flex flex-1 items-center flex-nowrap overflow-x-hidden gap-2" >
198163 { renderedExplanation }
199- </ Box >
164+ </ div >
200165 </ Fragment >
201166 ) : (
202167 < Fragment key = { index } > { renderedExplanation } </ Fragment >
0 commit comments