I'm working on a web application and I'm using react in the frontend with grommet ui library for design .. I want to make my web application responsive but when I use ResponsiveContext and add breakpoints values I still get the same text size when I reduce the screen size from large to small .. I copied the breakpoints values from the grommet documentations
code
// other imports ...
import { ResponsiveContext, Grommet } from "grommet";
const theme = {
global: {
font: {
family: "Roboto",
},
breakpoints: {
small: {
value: 768,
borderSize: {
xsmall: "1px",
small: "2px",
medium: "4px",
large: "6px",
xlarge: "12px",
},
edgeSize: {
none: "0px",
hair: "1px",
xxsmall: "2px",
xsmall: "3px",
small: "6px",
medium: "12px",
large: "24px",
xlarge: "48px",
},
size: {
xxsmall: "24px",
xsmall: "48px",
small: "96px",
medium: "192px",
large: "384px",
xlarge: "768px",
full: "100%",
},
},
medium: { value: 1536 },
large: {},
},
},
layer: {
background: "white",
border: {
radius: "10px",
},
},
};
const App = () => {
/*
some code
*/
return (
<Grommet theme={theme}>
<ResponsiveContext.Consumer>
{(size) => (
<AppGrid>
<Toaster />
<BrowserRouter>
<Header
notifsUpdated={notifsUpdated}
scrollToList={scrollToList}
/>
<GiveawayCreation />
<Routes>
<Route
path='/'
element={
<Main
data={data}
setData={setData}
refresh={refresh}
setRefresh={setRefresh}
showOwned={showOwned}
setShowOwned={setShowOwned}
MainRef={MainRef}
fetchLoading={fetchLoading}
fetchError={fetchError}
size={size}
/>
}
/>
<Route
path='/login/success'
element={<LoginSuccess />}
/>
<Route
path='/deletedata'
element={
<DeletionData
setRefresh={setRefresh}
refresh={refresh}
/>
}
/>
</Routes>
<AppFooter />
</BrowserRouter>
</AppGrid>
)}
</ResponsiveContext.Consumer>
</Grommet>
);
};