@@ -14,6 +14,7 @@ import {useSyncStore} from '../../../web/react/hooks';
14
14
import { ContextSep } from 'nice-ui/lib/4-card/ContextMenu' ;
15
15
import { UrlDisplayCard } from './UrlDisplayCard' ;
16
16
import type { SliceConfigState } from '../state/types' ;
17
+ import { BasicButtonClose } from 'nice-ui/lib/2-inline-block/BasicButton/BasicButtonClose' ;
17
18
18
19
export interface InlineConfigCardProps {
19
20
config : SliceConfigState < any > ;
@@ -51,14 +52,20 @@ export const InlineConfigCard: React.FC<InlineConfigCardProps> = ({config, onSav
51
52
) }
52
53
</ ContextPaneHeader >
53
54
< div style = { { padding : '8px 16px' } } >
54
- < FormRow title = { 'Address' } >
55
+ < FormRow >
55
56
< CollaborativeInput str = { href }
56
- input = { ( ref ) => < Input focus inp = { ref } type = { 'text' } size = { - 1 } placeholder = { 'https://' } onKeyDown = { ( e ) => {
57
+ input = { ( ref ) => < Input focus inp = { ref } type = { 'text' } size = { - 1 } placeholder = { 'https://' }
58
+ onKeyDown = { ( e ) => {
57
59
if ( e . key === 'Enter' ) {
58
60
e . preventDefault ( ) ;
59
61
onSave ( ) ;
60
62
}
61
- } } /> } />
63
+ } } right = { (
64
+ < div style = { { paddingRight : 8 , width : 24 , height : 24 } } >
65
+ { ! ! hrefView && < BasicButtonClose onClick = { ( ) => href ( ) . del ( 0 , href ( ) . length ( ) ) } /> }
66
+ </ div >
67
+ ) }
68
+ /> } />
62
69
</ FormRow >
63
70
{ /* <FormRow title={'Title'}>
64
71
<CollaborativeInput str={title}
@@ -67,6 +74,7 @@ export const InlineConfigCard: React.FC<InlineConfigCardProps> = ({config, onSav
67
74
</ div >
68
75
69
76
< ContextSep line />
77
+ < ContextSep />
70
78
< ContextTitle > Preview</ ContextTitle >
71
79
{ hrefView ? (
72
80
< div style = { { display : 'flex' , padding : '24px 16px 32px' , alignItems : 'center' , justifyContent : 'center' } } >
0 commit comments