mirror of
https://github.com/baserow/baserow.git
synced 2026-12-04 08:18:42 +00:00
* first commit * feat: add configurable breakpoints styles and update SCSS imports * change icon and menu position * fixings and improvments * add changelog * lint * generate dynamic media queries from elementType * store responsive breakpoints in a JSON field * initialize default breakpoints when creating applications * confirm breakpoint settings saves * lint * fix: address configurable breakpoint review feedback * fix: address responsive breakpoint feedback
24 lines
546 B
JavaScript
24 lines
546 B
JavaScript
export const LEGACY_BUILDER_BREAKPOINTS = Object.freeze({
|
|
mobile: 500,
|
|
tablet: 768,
|
|
})
|
|
|
|
// Keep these in sync with the constants in `baserow.contrib.builder.models`.
|
|
export const MIN_BUILDER_BREAKPOINT = 320
|
|
export const MAX_BUILDER_BREAKPOINT = 1920
|
|
|
|
export function getBuilderBreakpoints(builder) {
|
|
const { mobile, tablet } = builder.breakpoints || {}
|
|
|
|
if (
|
|
mobile === null ||
|
|
mobile === undefined ||
|
|
tablet === null ||
|
|
tablet === undefined
|
|
) {
|
|
return LEGACY_BUILDER_BREAKPOINTS
|
|
}
|
|
|
|
return { mobile, tablet }
|
|
}
|