File tree Expand file tree Collapse file tree
packages/ui/src/components/editor/panel/ResponsePreview/components Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3333.hidden {
3434 display : flex ;
3535 align-items : center ;
36- margin : 0 var (--padding-12px );
36+ margin : var ( --padding-4px ) var (--padding-12px );
3737 gap : var (--padding-8px );
38- font-size : var (--font-size-12px );
39- color : var (--cwc-text-color-dimmed );
4038 padding-right : var (--padding-9px );
39+ position : relative ;
4140
4241 & :hover {
4342 color : var (--cwc-text-color );
5352 height : 1px ;
5453 background-color : var (--cwc-border-color-dimmed );
5554}
55+
56+ .icon {
57+ position : absolute ;
58+ left : 50% ;
59+ transform : translateX (-50% );
60+ background-color : var (--vscode-sideBar-background );
61+ padding : 0 var (--padding-8px );
62+ }
63+
64+ .tokens {
65+ font-size : var (--font-size-12px );
66+ color : var (--cwc-text-color-dimmed );
67+ }
Original file line number Diff line number Diff line change 11import { FC , useRef } from 'react'
22import ReactMarkdown from 'react-markdown'
33import styles from './TextItem.module.scss'
4+ import { IconButton } from '../../IconButton'
45
56type Props = {
67 content : string
@@ -29,10 +30,14 @@ export const TextItem: FC<Props> = (props) => {
2930 className = { styles . hidden }
3031 onClick = { ( ) => ref . current && props . on_toggle ( ref . current ) }
3132 title = { props . content }
32- role = "button"
3333 >
3434 < div className = { styles . line } />
35- { Math . floor ( props . content . length * 0.25 ) }
35+ < div className = { styles . icon } >
36+ < IconButton codicon_icon = "add" />
37+ </ div >
38+ < span className = { styles . tokens } >
39+ { Math . floor ( props . content . length * 0.25 ) || 1 }
40+ </ span >
3641 </ div >
3742 ) }
3843 </ >
You can’t perform that action at this time.
0 commit comments