File tree Expand file tree Collapse file tree 3 files changed +28
-7
lines changed
frontends/web/src/routes/settings/components Expand file tree Collapse file tree 3 files changed +28
-7
lines changed Original file line number Diff line number Diff line change 15
15
*/
16
16
17
17
import { useTranslation } from 'react-i18next' ;
18
- import { SettingsItem } from '../settingsItem/settingsItem' ;
18
+ import { SettingsItem , SettingsValue } from '../settingsItem/settingsItem' ;
19
19
20
20
type TProps = {
21
21
rootFingerprint : string ;
@@ -27,7 +27,9 @@ const RootFingerprintSetting = ({ rootFingerprint }: TProps) => {
27
27
< SettingsItem
28
28
settingName = { 'Root fingerprint' }
29
29
secondaryText = { t ( 'deviceSettings.deviceInformation.rootFingerprint.description' ) }
30
- displayedValue = { rootFingerprint }
30
+ displayedValue = {
31
+ < SettingsValue > { rootFingerprint } </ SettingsValue >
32
+ }
31
33
/>
32
34
) ;
33
35
} ;
Original file line number Diff line number Diff line change 1
1
.container {
2
- height : var (--item-height-xlarge );
2
+ min- height: var (--item-height-xlarge );
3
3
width : 100% ;
4
4
min-width : 230px ;
5
5
display : flex;
56
56
text-overflow : ellipsis;
57
57
}
58
58
59
+ .nowrap {
60
+ white-space : nowrap;
61
+ }
62
+
59
63
@media (max-width : 768px ) {
60
64
.container {
61
- height : auto;
62
- margin-bottom : 5px ;
63
- min-width : 100% ;
65
+ min- height: auto;
66
+ margin-bottom : 5px ;
67
+ min-width : 100% ;
64
68
}
65
69
66
70
.secondaryText {
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ import styles from './settingsItem.module.css';
20
20
type TProps = {
21
21
className ?: string
22
22
collapseOnSmall ?: boolean ;
23
- displayedValue ?: string ;
23
+ displayedValue ?: string | ReactNode ;
24
24
extraComponent ?: ReactNode ;
25
25
hideDisplayedValueOnSmall ?: boolean ;
26
26
onClick ?: ( ) => void ;
@@ -84,3 +84,18 @@ export const SettingsItem = ({
84
84
</ >
85
85
) ;
86
86
} ;
87
+
88
+ type TSettingsValueProps = {
89
+ children : ReactNode ;
90
+ wrap ?: boolean ;
91
+ }
92
+
93
+ export const SettingsValue = ( {
94
+ children,
95
+ wrap,
96
+ } : TSettingsValueProps ) => {
97
+ const classNames = wrap ? '' : styles . nowrap ;
98
+ return (
99
+ < span className = { classNames } > { children } </ span >
100
+ ) ;
101
+ } ;
You can’t perform that action at this time.
0 commit comments