1
1
import React from 'react' ;
2
2
import { qtMerge } from '@deriv/quill-design' ;
3
- import { Text , TextProps } from '@deriv-com/ui/dist/components/Text' ;
3
+ import { Text } from '@deriv-com/ui/dist/components/Text' ;
4
4
import { TRegulatorsContentProps , TRowItem } from '../../constants/regulators-modal-content' ;
5
5
6
6
type TProps = TRegulatorsContentProps & {
@@ -26,24 +26,24 @@ const Row = ({ attribute, content, id, idx }: TProps) => (
26
26
{ Array . isArray ( content [ rowKey ] ) ? (
27
27
( content [ rowKey ] as TRowItem [ ] ) ?. map ( item => (
28
28
< Text
29
- align = { ( item ?. options ?. align as TextProps [ 'align' ] ) ?? 'center' }
29
+ align = { item ?. options ?. align ?? 'center' }
30
30
as = 'p'
31
- color = { ( item ?. options ?. color as TextProps [ 'color' ] ) ?? 'prominent' }
31
+ color = { item ?. options ?. color ?? 'prominent' }
32
32
key = { `${ id } _${ rowKey } _${ item ?. text } ` }
33
33
size = '2xs'
34
- weight = { item ?. options ?. weight as TextProps [ 'weight' ] }
34
+ weight = { item ?. options ?. weight }
35
35
>
36
36
{ item ?. text }
37
- { item ?. options ?. should_show_asterick_at_end && < Text color = 'error' > *</ Text > }
37
+ { item ?. options ?. shouldShowAsterickAtEnd && < Text color = 'error' > *</ Text > }
38
38
</ Text >
39
39
) )
40
40
) : (
41
41
< Text
42
- align = { ( ( content [ rowKey ] as TRowItem ) ?. options ?. align as TextProps [ 'align' ] ) ?? 'center' }
42
+ align = { ( content [ rowKey ] as TRowItem ) ?. options ?. align ?? 'center' }
43
43
as = 'p'
44
- color = { ( ( content [ rowKey ] as TRowItem ) ?. options ?. color as TextProps [ 'color' ] ) ?? 'prominent' }
44
+ color = { ( content [ rowKey ] as TRowItem ) ?. options ?. color ?? 'prominent' }
45
45
size = '2xs'
46
- weight = { ( content [ rowKey ] as TRowItem ) ?. options ?. weight as TextProps [ 'weight' ] }
46
+ weight = { ( content [ rowKey ] as TRowItem ) ?. options ?. weight }
47
47
>
48
48
{ ( content [ rowKey ] as TRowItem ) ?. text }
49
49
</ Text >
0 commit comments