import React, { useState } from 'react'; import { AppWrapper } from '../../../ui/components'; import { AppContent } from '../../../ui/components/AppContent'; import { useApp } from '../../../os/apps/hooks/useApps'; import { useExample } from '../hooks/useExample'; import { ExampleThemeProvider } from '../providers/ExampleThemeProvider'; import { AppTitle } from '../../../ui/components/AppTitle'; import PlayIcon from '@material-ui/icons/PlayArrow'; import StopIcon from '@material-ui/icons/Stop'; import { Button, IconButton } from '@material-ui/core'; import useSound from '../../../os/sound/hooks/useSound'; export const ExampleApp = () => { // calling the example hook, and we assign the value to a variable const exampleString = useExample(); const example = useApp('EXAMPLE'); const [soundName, setSound] = useState('pixel.ogg'); const { play, playing, stop } = useSound('media/ringtones/' + soundName); const toggleSound = () => { if (soundName === 'pixel.ogg') { setSound('marimba.ogg'); return; } setSound('pixel.ogg'); }; return (

This is an example

{/* Here we are using the value in a h3 tag */}

{exampleString}

(playing ? stop() : play())}> {playing ? : }
); };