summaryrefslogtreecommitdiff
path: root/storybook/toggle-storybook.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'storybook/toggle-storybook.tsx')
-rw-r--r--storybook/toggle-storybook.tsx16
1 files changed, 8 insertions, 8 deletions
diff --git a/storybook/toggle-storybook.tsx b/storybook/toggle-storybook.tsx
index 394ecf4..301695a 100644
--- a/storybook/toggle-storybook.tsx
+++ b/storybook/toggle-storybook.tsx
@@ -1,6 +1,6 @@
-import React, { useState, useEffect } from "react"
-import { DevSettings } from "react-native"
-import { loadString, saveString } from "../app/utils/storage"
+import React, { useState, useEffect } from 'react'
+import { DevSettings } from 'react-native'
+import { loadString, saveString } from '../app/utils/storage'
/**
* Toggle Storybook mode, in __DEV__ mode only.
@@ -19,18 +19,18 @@ export function ToggleStorybook(props) {
useEffect(() => {
if (__DEV__ && DevSettings) {
// Load the setting from storage if it's there
- loadString("devStorybook").then((storedSetting) => {
+ loadString('devStorybook').then((storedSetting) => {
// Set the initial value
- setShowStorybook(storedSetting === "on")
+ setShowStorybook(storedSetting === 'on')
// Add our toggle command to the menu
- DevSettings.addMenuItem("Toggle Storybook", () => {
+ DevSettings.addMenuItem('Toggle Storybook', () => {
setShowStorybook((show) => {
// On toggle, flip the current value
show = !show
// Write it back to storage
- saveString("devStorybook", show ? "on" : "off")
+ saveString('devStorybook', show ? 'on' : 'off')
// Return it to change the local state
return show
@@ -38,7 +38,7 @@ export function ToggleStorybook(props) {
})
// Load the storybook UI once
- setStorybookUIRoot(() => require("./storybook").StorybookUIRoot)
+ setStorybookUIRoot(() => require('./storybook').StorybookUIRoot)
})
}
}, [])