Skip to content

Commit

Permalink
Merge pull request #874 from Lovelyfin00/make-design-system-card-clic…
Browse files Browse the repository at this point in the history
…kable

chore: made design card clickable with hover and focus states
  • Loading branch information
aaronreed708 authored May 14, 2024
2 parents a527d0a + 1b57058 commit e7fc07f
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions code/src/ui/src/components/SystemCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Licensed under Apache-2.0 License. See License.txt in the project root for license information
*/
import { Card, CardContent, CardHeader, IconButton, Box, Menu, MenuItem, Divider, Button } from "@mui/material";
import React, { useState, MouseEvent, ReactNode } from "react";
import React, { useState, MouseEvent } from "react";
import MoreVertIcon from '@mui/icons-material/MoreVert';
import { FormattedTime, FormattedDate } from "react-intl";
import { ThemeBuilder } from "@finos/a11y-theme-builder-sdk";
Expand All @@ -22,6 +22,7 @@ export const SystemCard: React.FC<Props> = ({themeBuilder, designSystems, design
const [anchorEl, setAnchorEl] = useState<null | HTMLElement>(null);
const open = Boolean(anchorEl);
const handleClick = (event: MouseEvent<HTMLElement>) => {
event.stopPropagation();
setAnchorEl(event.currentTarget);
};
const [doCopy, setDoCopy] = useState(false);
Expand Down Expand Up @@ -173,7 +174,10 @@ export const SystemCard: React.FC<Props> = ({themeBuilder, designSystems, design

return (
<div className="system-card">
<Card>
<Card
className= "clickable"
onClick={() => handleClose("load")}
>
<CardHeader
action={
<IconButton
Expand All @@ -189,10 +193,7 @@ export const SystemCard: React.FC<Props> = ({themeBuilder, designSystems, design
</IconButton>
}
title={
<h5
onClick={() => handleClose("load")}
style={{cursor: "pointer"}}
>{name}</h5>
<h5>{name}</h5>
}
subheader={
<div className="date caption quiet">
Expand Down

0 comments on commit e7fc07f

Please sign in to comment.