Skip to content

Commit

Permalink
feat: Show flowchart templates
Browse files Browse the repository at this point in the history
  • Loading branch information
miyanokomiya committed Apr 7, 2024
1 parent b024b29 commit c10d984
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
8 changes: 8 additions & 0 deletions src/components/ShapeTemplatePanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,14 @@ export const ShapeTemplatePanel: React.FC = () => {

return (
<div className={"transition-opacity" + (stateLabel === "DroppingNewShape" ? " opacity-30" : "")}>
<GroupAccordion
selectedName={selected}
name="Flowchart"
type="templates"
size="lg"
onClick={handleClickAccordion}
onIconDown={handleIconDown}
/>
<GroupAccordion
selectedName={selected}
name="Sequence"
Expand Down
4 changes: 2 additions & 2 deletions src/components/molecules/ShapeLibraryGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -235,11 +235,11 @@ export const IconItem: React.FC<IconButtonProps> = ({ url, name, id, size, onDow
[onDown, id, url],
);

const wrapperClass = size === "lg" ? "w-full h-auto max-h-32" : "w-10 h-10";
const wrapperClass = size === "lg" ? "w-full h-auto max-h-32 p-1" : "w-10 h-10";
const skeletonClass = size === "lg" ? "w-full h-32" : "w-full h-full";

return (
<li className={wrapperClass}>
<li className={"rounded hover:bg-gray-200 " + wrapperClass}>
<button type="button" onPointerDown={handleDown} className="w-full h-full cursor-grab touch-none" title={name}>
<ImageWithSkeleton
src={url}
Expand Down

0 comments on commit c10d984

Please sign in to comment.