All files / app/pages/settings settings-appearance.tsx

0% Statements 0/11
100% Branches 0/0
0% Functions 0/2
0% Lines 0/10

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27                                                     
import { SettingDescription } from './components/settings-layout';
import { SettingSection } from './components/settings-section';
import { Button, useColorMode } from '@stacks/ui';
import React from 'react';
import toast from 'react-hot-toast';
 
export const SettingsAppearance = () => {
  const { colorMode } = useColorMode();
 
  return (
    <SettingSection title="Theme">
      <SettingDescription>
        You&apos;re currently using the {colorMode} theme. <br />{' '}
        <Button
          mt="base"
          onClick={() => {
            void main.theme.setSystemMode();
            toast('Using system color mode');
          }}
        >
          Use system color mode
        </Button>
      </SettingDescription>
    </SettingSection>
  );
};