add xs breakpoint

This commit is contained in:
Chuck Dries 2022-07-09 17:04:55 -07:00
parent 2c66aa9f49
commit d657058df5
No known key found for this signature in database
GPG Key ID: A00B7AEAE1DC5BE6
3 changed files with 6 additions and 2 deletions

View File

@ -19,7 +19,7 @@ const MasonryGallery = ({
[aspectTargetsByBreakpoint]
);
const { breakpoint } = useBreakpoint(breakpoints, "md");
const { breakpoint } = useBreakpoint(breakpoints, "sm");
const scrollIntoView = React.useCallback(() => {
if (!window.location.hash) {
@ -87,6 +87,8 @@ const MasonryGallery = ({
let cursor = 0;
return (
<>
{/* {breakpoint} */}
<div
className="w-full flex items-center flex-wrap"
style={{
@ -158,8 +160,8 @@ const MasonryGallery = ({
);
})}
</div>
</>
);
// return null;
};
export default MasonryGallery;

View File

@ -148,6 +148,7 @@ const GalleryPage = ({ data }) => {
</div>
<MasonryGallery
aspectsByBreakpoint={{
xs: 2,
sm: 3,
md: 4,
lg: 4,

View File

@ -6,6 +6,7 @@ module.exports = {
// darkMode: 'media', // or 'media' or 'class'
theme: {
screens: {
xs: "10px",
sm: "640px",
md: "768px",
lg: "1024px",