mirror of
https://github.com/roleypoly/roleypoly.git
synced 2025-05-08 01:22:34 +00:00
chore: update prettier tab width for consistency (#175)
This commit is contained in:
parent
a931f8c69c
commit
f24d2fcc99
247 changed files with 7224 additions and 7375 deletions
|
@ -2,21 +2,21 @@ import { withContext } from '@roleypoly/misc-utils/withContext';
|
|||
import * as React from 'react';
|
||||
|
||||
export type ScreenSize = {
|
||||
onSmallScreen: boolean;
|
||||
onTablet: boolean;
|
||||
onDesktop: boolean;
|
||||
onSmallScreen: boolean;
|
||||
onTablet: boolean;
|
||||
onDesktop: boolean;
|
||||
};
|
||||
|
||||
export type BreakpointProps = {
|
||||
screenSize: ScreenSize;
|
||||
screenSize: ScreenSize;
|
||||
};
|
||||
|
||||
const defaultScreenSize: BreakpointProps = {
|
||||
screenSize: {
|
||||
onSmallScreen: true,
|
||||
onDesktop: false,
|
||||
onTablet: false,
|
||||
},
|
||||
screenSize: {
|
||||
onSmallScreen: true,
|
||||
onDesktop: false,
|
||||
onTablet: false,
|
||||
},
|
||||
};
|
||||
|
||||
export const BreakpointContext = React.createContext(defaultScreenSize);
|
||||
|
@ -24,4 +24,4 @@ export const BreakpointContext = React.createContext(defaultScreenSize);
|
|||
export const useBreakpointContext = () => React.useContext(BreakpointContext);
|
||||
|
||||
export const withBreakpoints = <T>(Component: React.ComponentType<T>) =>
|
||||
withContext(BreakpointContext, Component as any);
|
||||
withContext(BreakpointContext, Component as any);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue