af9097e1c0
Signed-off-by: Camila Belo <camilaibs@gmail.com>
545 B
545 B
@backstage/core-components
| @backstage/core-components |
|---|
| patch |
Adds the ability to mock a media query per break point and to change the active break point during a test. Usage example:
const { set } = mockBreakpoint({
initialBreakpoint: 'md',
queryBreakpointMap: {
'(min-width:1500px)': 'xl',
'(min-width:1000px)': 'lg',
'(min-width:700px)': 'md',
'(min-width:400px)': 'sm',
'(min-width:0px)': 'xs',
},
});
// assertions for when the active break point is "md"
set('lg');
// assertions for when the active break point is "lg"