Mobile mod label setting component (#3267)
* Mobile mod label setting component * Bump label title size * Dont show disabled label config on mobile --------- Co-authored-by: Paul Frazee <pfrazee@gmail.com>
This commit is contained in:
parent
877eab0fe3
commit
b622f63918
2 changed files with 64 additions and 37 deletions
|
@ -16,6 +16,7 @@ type BreakpointName = keyof typeof breakpoints
|
|||
const breakpoints: {
|
||||
[key: string]: number
|
||||
} = {
|
||||
gtPhone: 500,
|
||||
gtMobile: 800,
|
||||
gtTablet: 1300,
|
||||
}
|
||||
|
@ -26,6 +27,7 @@ function getActiveBreakpoints({width}: {width: number}) {
|
|||
|
||||
return {
|
||||
active: active[active.length - 1],
|
||||
gtPhone: active.includes('gtPhone'),
|
||||
gtMobile: active.includes('gtMobile'),
|
||||
gtTablet: active.includes('gtTablet'),
|
||||
}
|
||||
|
@ -39,6 +41,7 @@ export const Context = React.createContext<{
|
|||
theme: themes.Theme
|
||||
breakpoints: {
|
||||
active: BreakpointName | undefined
|
||||
gtPhone: boolean
|
||||
gtMobile: boolean
|
||||
gtTablet: boolean
|
||||
}
|
||||
|
@ -47,6 +50,7 @@ export const Context = React.createContext<{
|
|||
theme: themes.light,
|
||||
breakpoints: {
|
||||
active: undefined,
|
||||
gtPhone: false,
|
||||
gtMobile: false,
|
||||
gtTablet: false,
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue