Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion client/packages/lowcoder/src/comps/hooks/drawerComp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ import styled from "styled-components";
import { useUserViewMode } from "util/hooks";
import { isNumeric } from "util/stringUtils";
import { NameConfig, withExposingConfigs } from "../generators/withExposing";
import { IconControl } from "comps/controls/iconControl";
import { hasIcon } from "comps/utils";
import { title } from "process";
import { SliderControl } from "../controls/sliderControl";
import clsx from "clsx";
Expand Down Expand Up @@ -122,6 +124,7 @@ const childrenMap = {
showMask: withDefault(BoolControl, true),
toggleClose:withDefault(BoolControl,true),
escapeClosable: withDefault(BoolControl, true),
closeIcon: withDefault(IconControl, ""),
};

type ChildrenType = NewChildren<RecordConstructorToComp<typeof childrenMap>> & {
Expand All @@ -138,6 +141,9 @@ const DrawerPropertyView = React.memo((props: {
{props.children.title.getView() && props.children.titleAlign.propertyView({ label: trans("drawer.titleAlign"), radioButton: true })}
{props.children.closePosition.propertyView({ label: trans("drawer.closePosition"), radioButton: true })}
{props.children.placement.propertyView({ label: trans("drawer.placement"), radioButton: true })}
{props.children.toggleClose.getView() && props.children.closeIcon.propertyView({
label: trans("drawer.closeIcon"),
})}
{["top", "bottom"].includes(props.children.placement.getView())
? props.children.autoHeight.getPropertyView()
: props.children.width.propertyView({
Expand Down Expand Up @@ -262,7 +268,7 @@ const DrawerView = React.memo((
$closePosition={props.closePosition}
onClick={onClose}
>
<CloseOutlined />
{hasIcon(props.closeIcon) ? props.closeIcon : <CloseOutlined />}
</ButtonStyle>
)}
<InnerGrid
Expand Down
4 changes: 3 additions & 1 deletion client/packages/lowcoder/src/i18n/locales/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2363,7 +2363,9 @@ export const en = {
"openDrawerDesc": "Open Drawer",
"closeDrawerDesc": "Close Drawer",
"width": "Drawer Width",
"height": "Drawer Height"
"height": "Drawer Height",
"closeIcon": "Close Icon",

},
"meeting": {
"logLevel": "Agora SDK Log Level",
Expand Down
Loading