Skip to content

Commit

Permalink
front: make add button clickable across the entire element
Browse files Browse the repository at this point in the history
Signed-off-by: Achraf Mohyeddine <[email protected]>
  • Loading branch information
achrafmohye committed Dec 4, 2024
1 parent ced78b4 commit 45d0c85
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ const StdcmDefaultCard = ({
disabled = false,
className = 'add-via',
}: StdcmCardProps) => (
<StdcmCard hasTip={hasTip} disabled={disabled} className={className}>
<button type="button" onClick={onClick}>
<button type="button" disabled={disabled} onClick={onClick}>
<StdcmCard hasTip={hasTip} disabled={disabled} className={className}>
<span className="stdcm-default-card-icon">{Icon}</span>
<span className="stdcm-default-card-button">{text}</span>
</button>
</StdcmCard>
</StdcmCard>
</button>
);

export default StdcmDefaultCard;
4 changes: 0 additions & 4 deletions front/src/styles/scss/applications/stdcm/_card.scss
Original file line number Diff line number Diff line change
Expand Up @@ -197,10 +197,6 @@
line-height: 24px;
margin-left: 12px;
}

button:focus {
outline: none;
}
}

&.disabled,
Expand Down
8 changes: 8 additions & 0 deletions front/src/styles/scss/applications/stdcm/_home.scss
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,14 @@

.stdcm-vias-list {
margin-block: 16px;

button {
text-align: left;
}

button:focus {
outline: none;
}
}

.stdcm-origin-icon,
Expand Down
8 changes: 8 additions & 0 deletions front/src/styles/scss/applications/stdcm/_linkedPath.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@
margin-top: 18px;
}

button {
text-align: left;
}

button:focus {
outline: none;
}

.stdcm-card__header {
button {
font-size: 0.875rem;
Expand Down

0 comments on commit 45d0c85

Please sign in to comment.