@mantine/core
Version:
React components library focused on usability, accessibility and developer experience
1 lines • 736 B
Source Map (JSON)
{"version":3,"file":"get-breakpoint-value.cjs","names":["px"],"sources":["../../../../src/core/utils/get-breakpoint-value/get-breakpoint-value.ts"],"sourcesContent":["import type { MantineBreakpoint } from '../../MantineProvider';\nimport { px } from '../units-converters';\n\nexport type BreakpointsSource = Record<MantineBreakpoint, number | string>;\n\nexport function getBreakpointValue(breakpoint: number | string, breakpoints: BreakpointsSource) {\n if (breakpoint in breakpoints) {\n return px(breakpoints[breakpoint as MantineBreakpoint]) as number;\n }\n\n return px(breakpoint) as number;\n}\n"],"mappings":";;;AAKA,SAAgB,mBAAmB,YAA6B,aAAgC;AAC9F,KAAI,cAAc,YAChB,QAAOA,WAAAA,GAAG,YAAY,YAAiC;AAGzD,QAAOA,WAAAA,GAAG,WAAW"}