Skip to content

Commit 437ddf2

Browse files
committed
Move the warning icon inside the label element and update its styling for proper inline alignment
- include the warning in label so it is clickable
1 parent b074559 commit 437ddf2

2 files changed

Lines changed: 9 additions & 8 deletions

File tree

‎packages/ui/src/components/editor/prompt/SelectedFiles/SelectedFiles.module.scss‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,14 @@
3838
}
3939

4040
.warning {
41-
display: flex;
42-
align-items: center;
41+
display: inline-block;
4342
color: var(--cwc-text-color-orange);
44-
margin-left: 6px;
43+
margin-right: 6px;
44+
vertical-align: middle;
4545

4646
span::before {
4747
font-size: 15px;
48+
line-height: 24px;
4849
}
4950
}
5051

‎packages/ui/src/components/editor/prompt/SelectedFiles/SelectedFiles.tsx‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,6 @@ export const SelectedFiles: React.FC<SelectedFiles.Props> = (props) => {
2626
on_change={props.on_toggle_include_selected_files}
2727
title={props.translations.attach_selected_files}
2828
/>
29-
{!props.include_selected_files && (
30-
<div className={styles.warning}>
31-
<span className="codicon codicon-warning" />
32-
</div>
33-
)}
3429
<label
3530
className={styles.left__label}
3631
onClick={() =>
@@ -39,6 +34,11 @@ export const SelectedFiles: React.FC<SelectedFiles.Props> = (props) => {
3934
)
4035
}
4136
>
37+
{!props.include_selected_files && (
38+
<span className={styles.warning}>
39+
<span className="codicon codicon-warning" />
40+
</span>
41+
)}
4242
{props.translations.attach_selected_files}
4343
</label>
4444
</div>

0 commit comments

Comments
 (0)