From 26409f3e8e00b9d8fb2c072951068e7628128baa Mon Sep 17 00:00:00 2001 From: Thibaut Girka Date: Mon, 1 Oct 2018 22:11:11 +0200 Subject: [PATCH] Add support for hints (or extended descriptions) in local-settings pages --- .../glitch/features/local_settings/page/item/index.js | 2 ++ .../flavours/glitch/styles/components/local_settings.scss | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/app/javascript/flavours/glitch/features/local_settings/page/item/index.js b/app/javascript/flavours/glitch/features/local_settings/page/item/index.js index eacc7419c..66b937365 100644 --- a/app/javascript/flavours/glitch/features/local_settings/page/item/index.js +++ b/app/javascript/flavours/glitch/features/local_settings/page/item/index.js @@ -17,6 +17,7 @@ export default class LocalSettingsPageItem extends React.PureComponent { options: PropTypes.arrayOf(PropTypes.shape({ value: PropTypes.string.isRequired, message: PropTypes.string.isRequired, + hint: PropTypes.string, })), settings: ImmutablePropTypes.map.isRequired, placeholder: PropTypes.string, @@ -62,6 +63,7 @@ export default class LocalSettingsPageItem extends React.PureComponent { disabled={!enabled} /> {opt.message} + {opt.hint && {opt.hint}} ); }); diff --git a/app/javascript/flavours/glitch/styles/components/local_settings.scss b/app/javascript/flavours/glitch/styles/components/local_settings.scss index 1adf54a1b..75e7d370d 100644 --- a/app/javascript/flavours/glitch/styles/components/local_settings.scss +++ b/app/javascript/flavours/glitch/styles/components/local_settings.scss @@ -28,6 +28,11 @@ } } + span.hint { + display: block; + color: $lighter-text-color; + } + h1 { font-size: 18px; font-weight: 500;