about summary refs log tree commit diff
path: root/app/javascript/flavours/glitch/features/local_settings
diff options
context:
space:
mode:
authorThibaut Girka <thib@sitedethib.com>2018-10-01 22:11:11 +0200
committerThibG <thib@sitedethib.com>2018-10-09 18:10:54 +0200
commit26409f3e8e00b9d8fb2c072951068e7628128baa (patch)
treea3527661b3528bb0d6c1c4210ac3c1bfa0261809 /app/javascript/flavours/glitch/features/local_settings
parent5f308a7f05a067211417307f249870d0b3fb8ebd (diff)
Add support for hints (or extended descriptions) in local-settings pages
Diffstat (limited to 'app/javascript/flavours/glitch/features/local_settings')
-rw-r--r--app/javascript/flavours/glitch/features/local_settings/page/item/index.js2
1 files changed, 2 insertions, 0 deletions
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 && <span class='hint'>{opt.hint}</span>}
           </label>
         );
       });