@@ -24,6 +24,8 @@ import styled from "styled-components";
2424import { useUserViewMode } from "util/hooks" ;
2525import { isNumeric } from "util/stringUtils" ;
2626import { NameConfig , withExposingConfigs } from "../generators/withExposing" ;
27+ import { IconControl } from "comps/controls/iconControl" ;
28+ import { hasIcon } from "comps/utils" ;
2729import { title } from "process" ;
2830import { SliderControl } from "../controls/sliderControl" ;
2931import clsx from "clsx" ;
@@ -122,6 +124,7 @@ const childrenMap = {
122124 showMask : withDefault ( BoolControl , true ) ,
123125 toggleClose :withDefault ( BoolControl , true ) ,
124126 escapeClosable : withDefault ( BoolControl , true ) ,
127+ closeIcon : withDefault ( IconControl , "" ) ,
125128} ;
126129
127130type ChildrenType = NewChildren < RecordConstructorToComp < typeof childrenMap > > & {
@@ -138,6 +141,9 @@ const DrawerPropertyView = React.memo((props: {
138141 { props . children . title . getView ( ) && props . children . titleAlign . propertyView ( { label : trans ( "drawer.titleAlign" ) , radioButton : true } ) }
139142 { props . children . closePosition . propertyView ( { label : trans ( "drawer.closePosition" ) , radioButton : true } ) }
140143 { props . children . placement . propertyView ( { label : trans ( "drawer.placement" ) , radioButton : true } ) }
144+ { props . children . toggleClose . getView ( ) && props . children . closeIcon . propertyView ( {
145+ label : trans ( "drawer.closeIcon" ) ,
146+ } ) }
141147 { [ "top" , "bottom" ] . includes ( props . children . placement . getView ( ) )
142148 ? props . children . autoHeight . getPropertyView ( )
143149 : props . children . width . propertyView ( {
@@ -262,7 +268,7 @@ const DrawerView = React.memo((
262268 $closePosition = { props . closePosition }
263269 onClick = { onClose }
264270 >
265- < CloseOutlined />
271+ { hasIcon ( props . closeIcon ) ? props . closeIcon : < CloseOutlined /> }
266272 </ ButtonStyle >
267273 ) }
268274 < InnerGrid
0 commit comments