Skip to content

Commit c25ed45

Browse files
committed
Add clickable styling and interaction to configuration list items when on_set_default is provided
1 parent f3118e0 commit c25ed45

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

‎packages/ui/src/components/editor/settings/ConfigurationsList/ConfigurationsList.module.scss‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,10 @@
5050
white-space: nowrap;
5151
text-overflow: ellipsis;
5252

53+
&.clickable {
54+
cursor: pointer;
55+
}
56+
5357
.default-icon {
5458
margin-right: 0.5em;
5559
}

‎packages/ui/src/components/editor/settings/ConfigurationsList/ConfigurationsList.tsx‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,12 @@ export const ConfigurationsList: React.FC<ConfigurationsList.Props> = (
5252
on_change={() => props.on_set_default?.(config.id)}
5353
/>
5454
)}
55-
<div className={styles.row__content}>
55+
<div
56+
className={cn(styles.row__content, {
57+
[styles.clickable]: !!props.on_set_default
58+
})}
59+
onClick={() => props.on_set_default?.(config.id)}
60+
>
5661
<span>{config.model}</span>
5762
<span>{config.description}</span>
5863
</div>

0 commit comments

Comments
 (0)