Skip to content

Commit d71da42

Browse files
committed
Correct the spacing and layout of the collapsed response preview component
1 parent db4c481 commit d71da42

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

‎packages/ui/src/components/editor/panel/ResponsePreview/components/TextItem.module.scss‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,18 @@
3131
&__collapse > span {
3232
cursor: pointer;
3333
font-weight: 500;
34+
font-size: var(--font-size-12px);
35+
36+
&:hover {
37+
text-decoration: underline;
38+
}
3439
}
3540
}
3641

3742
.hidden {
3843
display: flex;
3944
align-items: center;
4045
margin: var(--padding-2px) var(--padding-12px);
41-
gap: var(--padding-8px);
4246
padding-right: var(--padding-9px);
4347
position: relative;
4448

@@ -54,6 +58,7 @@
5458
flex: 1;
5559
height: 1px;
5660
background-color: var(--cwc-border-color-dimmed);
61+
margin: 0 10px 0 4px;
5762
}
5863

5964
&__tokens {

‎packages/ui/src/components/editor/panel/ResponsePreview/components/TextItem.tsx‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { FC, useRef } from 'react'
22
import ReactMarkdown from 'react-markdown'
33
import styles from './TextItem.module.scss'
4+
import cn from 'classnames'
45
import { IconButton } from '../../IconButton'
56

67
type Props = {
@@ -33,8 +34,8 @@ export const TextItem: FC<Props> = (props) => {
3334
className={styles.hidden}
3435
onClick={() => ref.current && props.on_toggle(ref.current)}
3536
title={props.content}
36-
role="button"
3737
>
38+
<IconButton codicon_icon="chevron-right" />
3839
<div className={styles.hidden__line} />
3940
<span className={styles.hidden__tokens}>
4041
{Math.floor(props.content.length * 0.25) || 1}

0 commit comments

Comments
 (0)