Skip to content

Instantly share code, notes, and snippets.

@eaccmk
Last active September 12, 2021 10:20
Show Gist options
  • Save eaccmk/d3ac7046a457b8c9ec8769e4c0ed00e7 to your computer and use it in GitHub Desktop.
Save eaccmk/d3ac7046a457b8c9ec8769e4c0ed00e7 to your computer and use it in GitHub Desktop.
Fitbit app companion (mobile) setting to demo slider and display value selected
// author : https://github.com/eaccmk
// created : sep-2021
function mySettings(props) {
return (
<Page>
<Section>
<Text>
Sync frequence in minutes :{" "}
<Text bold>{props.settingsStorage.getItem("minutes")}</Text>
</Text>
</Section>
<Slider
settingsKey="syncMinutes"
min="1"
max="60"
step="1"
defaultValue="15"
onChange={(value) => props.settingsStorage.setItem("minutes", value)}
/>
</Page>
);
}
registerSettingsPage(mySettings);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment