1
0
mirror of https://github.com/funamitech/mastodon synced 2024-12-11 13:19:01 +09:00

Add support for hints (or extended descriptions) in local-settings pages

This commit is contained in:
Thibaut Girka 2018-10-01 22:11:11 +02:00 committed by ThibG
parent 5f308a7f05
commit 26409f3e8e
2 changed files with 7 additions and 0 deletions

View File

@ -17,6 +17,7 @@ export default class LocalSettingsPageItem extends React.PureComponent {
options: PropTypes.arrayOf(PropTypes.shape({ options: PropTypes.arrayOf(PropTypes.shape({
value: PropTypes.string.isRequired, value: PropTypes.string.isRequired,
message: PropTypes.string.isRequired, message: PropTypes.string.isRequired,
hint: PropTypes.string,
})), })),
settings: ImmutablePropTypes.map.isRequired, settings: ImmutablePropTypes.map.isRequired,
placeholder: PropTypes.string, placeholder: PropTypes.string,
@ -62,6 +63,7 @@ export default class LocalSettingsPageItem extends React.PureComponent {
disabled={!enabled} disabled={!enabled}
/> />
{opt.message} {opt.message}
{opt.hint && <span class='hint'>{opt.hint}</span>}
</label> </label>
); );
}); });

View File

@ -28,6 +28,11 @@
} }
} }
span.hint {
display: block;
color: $lighter-text-color;
}
h1 { h1 {
font-size: 18px; font-size: 18px;
font-weight: 500; font-weight: 500;