Am little bit rookie on Grommet and having issues. I'm trying to set different edgeSize values for different breakpoints in Grommet v2.14.0
Here you can find theme code ->
export const v3theme = {
global: {
edgeSize: {
none: "0px",
small: "23px",
medium: "24px",
large: "25px",
xlarge: "26px"
},
breakpoints: {
xsmall: {
value: 478,
edgeSize: {
none: "0px",
small: "1px",
medium: "2px",
large: "4px",
xlarge: "5px"
}
},
small: {
value: 767,
edgeSize: {
none: "0px",
small: "6px",
medium: "7px",
large: "8px",
xlarge: "9px"
}
},
medium: {
value: 991,
edgeSize: {
none: "10px",
small: "11px",
medium: "12px",
large: "13px",
xlarge: "14px"
}
},
large: {
value: 1440,
edgeSize: {
none: "0px",
small: "15px",
medium: "16px",
large: "17px",
xlarge: "18px"
}
},
xlarge: {
edgeSize: {
none: "0px",
small: "19px",
medium: "20px",
large: "21px",
xlarge: "22px"
}
}
}
}
};
And a basic Box component, which includes pad="large"
<GrommetBox pad={{ horizontal: "large" }}>test</GrommetBox>
Breakpoints are working well. But paddings are not.
Expected Behaviour At the xsmall breakpoint, padding-left/right has to be 4px At the small breakpoint, padding-left/right has to be 8px At the medium breakpoint, padding-left/right has to be 13px At the largebreakpoint, padding-left/right has to be 17px At the xlarge breakpoint, padding-left/right has to be 21px
Actual Behaviour Only small breakpoint's edgeSize is working properly. here is the screenshot
On the other breakpoint sizes, code is calling default global.edgeSize.large value, which is 25px in this case. here is the screenshot
And, I've also found an SandBox example from ShimiSun and tested my code over on it, the issue is still there. https://codesandbox.io/s/grommet-ts-textinput-type-forked-bcrle
Propably, it is related with responsiveBreakpoint prop. When I change it to responsiveBreakpoint:"xsmall"
Then, xsmall's value starting to work.
In short, I want to define all breakpoints as responsive.
Do you have any idea what I am doing wrong, or is it a common behaviour?
Thanks in advance.