add xs breakpoint
This commit is contained in:
parent
2c66aa9f49
commit
d657058df5
@ -19,7 +19,7 @@ const MasonryGallery = ({
|
|||||||
[aspectTargetsByBreakpoint]
|
[aspectTargetsByBreakpoint]
|
||||||
);
|
);
|
||||||
|
|
||||||
const { breakpoint } = useBreakpoint(breakpoints, "md");
|
const { breakpoint } = useBreakpoint(breakpoints, "sm");
|
||||||
|
|
||||||
const scrollIntoView = React.useCallback(() => {
|
const scrollIntoView = React.useCallback(() => {
|
||||||
if (!window.location.hash) {
|
if (!window.location.hash) {
|
||||||
@ -87,6 +87,8 @@ const MasonryGallery = ({
|
|||||||
|
|
||||||
let cursor = 0;
|
let cursor = 0;
|
||||||
return (
|
return (
|
||||||
|
<>
|
||||||
|
{/* {breakpoint} */}
|
||||||
<div
|
<div
|
||||||
className="w-full flex items-center flex-wrap"
|
className="w-full flex items-center flex-wrap"
|
||||||
style={{
|
style={{
|
||||||
@ -158,8 +160,8 @@ const MasonryGallery = ({
|
|||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
</div>
|
</div>
|
||||||
|
</>
|
||||||
);
|
);
|
||||||
// return null;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export default MasonryGallery;
|
export default MasonryGallery;
|
||||||
|
@ -148,6 +148,7 @@ const GalleryPage = ({ data }) => {
|
|||||||
</div>
|
</div>
|
||||||
<MasonryGallery
|
<MasonryGallery
|
||||||
aspectsByBreakpoint={{
|
aspectsByBreakpoint={{
|
||||||
|
xs: 2,
|
||||||
sm: 3,
|
sm: 3,
|
||||||
md: 4,
|
md: 4,
|
||||||
lg: 4,
|
lg: 4,
|
||||||
|
@ -6,6 +6,7 @@ module.exports = {
|
|||||||
// darkMode: 'media', // or 'media' or 'class'
|
// darkMode: 'media', // or 'media' or 'class'
|
||||||
theme: {
|
theme: {
|
||||||
screens: {
|
screens: {
|
||||||
|
xs: "10px",
|
||||||
sm: "640px",
|
sm: "640px",
|
||||||
md: "768px",
|
md: "768px",
|
||||||
lg: "1024px",
|
lg: "1024px",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user