@@ -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 zIndex : withDefault ( NumberControl , Layers . drawer ) ,
126129} ;
127130
@@ -139,6 +142,9 @@ const DrawerPropertyView = React.memo((props: {
139142 { props . children . title . getView ( ) && props . children . titleAlign . propertyView ( { label : trans ( "drawer.titleAlign" ) , radioButton : true } ) }
140143 { props . children . closePosition . propertyView ( { label : trans ( "drawer.closePosition" ) , radioButton : true } ) }
141144 { props . children . placement . propertyView ( { label : trans ( "drawer.placement" ) , radioButton : true } ) }
145+ { props . children . toggleClose . getView ( ) && props . children . closeIcon . propertyView ( {
146+ label : trans ( "drawer.closeIcon" ) ,
147+ } ) }
142148 { [ "top" , "bottom" ] . includes ( props . children . placement . getView ( ) )
143149 ? props . children . autoHeight . getPropertyView ( )
144150 : props . children . width . propertyView ( {
@@ -266,7 +272,7 @@ const DrawerView = React.memo((
266272 $closePosition = { props . closePosition }
267273 onClick = { onClose }
268274 >
269- < CloseOutlined />
275+ { hasIcon ( props . closeIcon ) ? props . closeIcon : < CloseOutlined /> }
270276 </ ButtonStyle >
271277 ) }
272278 < InnerGrid
0 commit comments