Files
baserow/web-frontend/modules/builder/utils/breakpoints.js
Jonathan Adeline 97d3afd59a feat: add configurable responsive breakpoints (#5738)
* 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
2026-08-26 16:07:08 +04:00

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 }
}