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 1515 */
1616
1717import { useTranslation } from 'react-i18next' ;
18- import { SettingsItem } from '../settingsItem/settingsItem' ;
18+ import { SettingsItem , SettingsValue } from '../settingsItem/settingsItem' ;
1919
2020type TProps = {
2121 rootFingerprint : string ;
@@ -27,7 +27,9 @@ const RootFingerprintSetting = ({ rootFingerprint }: TProps) => {
2727 < SettingsItem
2828 settingName = { 'Root fingerprint' }
2929 secondaryText = { t ( 'deviceSettings.deviceInformation.rootFingerprint.description' ) }
30- displayedValue = { rootFingerprint }
30+ displayedValue = {
31+ < SettingsValue > { rootFingerprint } </ SettingsValue >
32+ }
3133 />
3234 ) ;
3335} ;
Original file line number Diff line number Diff line change 11.container {
2- height : var (--item-height-xlarge );
2+ min- height: var (--item-height-xlarge );
33 width : 100% ;
44 min-width : 230px ;
55 display : flex;
5656 text-overflow : ellipsis;
5757}
5858
59+ .nowrap {
60+ white-space : nowrap;
61+ }
62+
5963@media (max-width : 768px ) {
6064 .container {
61- height : auto;
62- margin-bottom : 5px ;
63- min-width : 100% ;
65+ min- height: auto;
66+ margin-bottom : 5px ;
67+ min-width : 100% ;
6468 }
6569
6670 .secondaryText {
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ import styles from './settingsItem.module.css';
2020type TProps = {
2121 className ?: string
2222 collapseOnSmall ?: boolean ;
23- displayedValue ?: string ;
23+ displayedValue ?: string | ReactNode ;
2424 extraComponent ?: ReactNode ;
2525 hideDisplayedValueOnSmall ?: boolean ;
2626 onClick ?: ( ) => void ;
@@ -84,3 +84,18 @@ export const SettingsItem = ({
8484 </ >
8585 ) ;
8686} ;
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