Skip to content

Commit

Permalink
center images
Browse files Browse the repository at this point in the history
  • Loading branch information
egonSchiele committed Aug 12, 2023
1 parent 01c7f2c commit f7382df
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/ImageBlock.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import { librarySlice } from "./reducers/librarySlice";
import { useState } from "react";
import React from "react";
import { useColors, useFonts } from "./lib/hooks";
function Image({ url }) {
return <img src={url} />;
function Image({ url, className = "" }) {
return <img src={url} className={`${className}`} />;
}

export default function ImageBlock({
Expand Down Expand Up @@ -38,11 +38,11 @@ export default function ImageBlock({
if (text.display === "linear") {
return (
<div
className="my-sm grid grid-cols-1 gap-2"
className="mb-lg grid grid-cols-1 gap-2"
onClick={setActiveTextIndex}
>
{images.map((url) => (
<Image url={url} key={url} />
<Image url={url} key={url} className="max-w-60 mx-auto" />
))}
</div>
);
Expand Down

0 comments on commit f7382df

Please sign in to comment.