Skip to content

Commit

Permalink
[@mantine/core] Update useComputedColorScheme types to match defini…
Browse files Browse the repository at this point in the history
…tion with other similar hooks (#5588)

If we have getInitialValueInEffect, we might as well be able to set defaultValue to undefined. Preferably I'd like to completely omit the parameter...
  • Loading branch information
c0nd3v committed Jan 27, 2024
1 parent 49ce186 commit bac6725
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { useColorScheme, UseMediaQueryOptions } from '@mantine/hooks';
import { useMantineColorScheme } from './use-mantine-color-scheme';

export function useComputedColorScheme(
defaultValue: 'light' | 'dark',
defaultValue?: 'light' | 'dark',
options: UseMediaQueryOptions = { getInitialValueInEffect: true }
) {
const osColorScheme = useColorScheme(defaultValue, options);
Expand Down

0 comments on commit bac6725

Please sign in to comment.