Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ export const ButtonGroupItem: FC<IButtonGroupItemProps> = ({ item, actionConfigu
className={classNames('sha-toolbar-btn sha-toolbar-btn-configurable')}
size={size}
block={block}
style={{ ...newStyles, ...(isGhost ? getGhostStyleOverrides() : {}) }}
style={{ ...newStyles, ...(isGhost ? getGhostStyleOverrides(buttonStyles.fontStyles) : {}) }}
>
{label}
</Button>
Expand Down
2 changes: 1 addition & 1 deletion shesha-reactjs/src/components/dynamicModal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export const DynamicModalWithContent: FC<IDynamicModalWithContentProps> = (props
centered
classNames={{ body: styles.dynamicModalBody }}
mask={{ closable: false }}
closable={showCloseIcon ?? true} // Add this line - default to true for backward compatibility
closable={showCloseIcon ?? true}
okButtonProps={{ disabled: isSubmitted, loading: isSubmitted }}
>
{renderContent(content)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,4 +191,4 @@ export const EndpointsAutocomplete: FC<IEndpointsAutocompleteProps> = ({ readOnl
: (
<>{autocomplete}</>
);
};
};
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ export const useStyles = createStyles(({ css, cx, token }, { autoAlignLabel = tr

.ant-form-item-control-input {
width: 100% !important;
min-height: 0px !important;
}

.ant-form-item-control-input-content {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ const InlineItem: FC<InlineItemProps> = (props) => {
.map((childItem) => (createMenuItem({ ...childItem, buttonType: childItem.buttonType ?? 'link' }, getIsVisible, appContext, form)));
// Ghost buttons: only foreground color, no background/border/shadow
const isGhostType = item.buttonType === 'ghost';
const ghostOverrides = isGhostType ? getGhostStyleOverrides() : {};
const ghostOverrides = isGhostType ? getGhostStyleOverrides(item.font) : item.styles;

return (
<Dropdown
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export const ConfigurableButton: FC<IConfigurableButtonProps> = (props) => {
const actualButtonType = isGhostType ? 'default' : (props.buttonType as ButtonType);

// Ghost buttons: only foreground color, no background/border/shadow
const ghostOverrides = isGhostType ? getGhostStyleOverrides() : {};
const ghostOverrides = isGhostType ? getGhostStyleOverrides(props.style) : props.style;

return (
<Button
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export const AdvancedFilterButton: FCUnwrapped<IAdvancedFilterButtonComponentPro
: {};

// Ghost buttons: only foreground color, no background/border/shadow
const ghostOverrides = isGhostType ? getGhostStyleOverrides() : {};
const ghostOverrides = isGhostType ? getGhostStyleOverrides({ color: props.color }) : props.styles;

const buttonStyle = {
...baseButtonStyle,
Expand Down
6 changes: 5 additions & 1 deletion shesha-reactjs/src/providers/dynamicModal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,11 @@ const DynamicModalProvider: FC<PropsWithChildren> = ({ children }) => {
const configurableActionsDispatcherProxy = useConfigurableActionDispatcherProxy();
return { configurableActionsDispatcherProxy };
},
migrator: (m) => m.add<IShowModalActionArguments>(0, migrateToV0),
migrator: (m) => m.add<IShowModalActionArguments>(0, migrateToV0)
.add<IShowModalActionArguments>(1, (prev) => ({
...prev,
showCloseIcon: prev.showCloseIcon !== undefined ? prev.showCloseIcon : true,
})),
},
actionDependencies,
);
Expand Down
4 changes: 3 additions & 1 deletion shesha-reactjs/src/utils/style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,12 +115,14 @@ export const addPx = (value: number | string | null | undefined, context?: objec
* const ghostStyles = getGhostStyleOverrides();
* // Returns: { background: 'transparent', backgroundColor: 'transparent', border: 'none', boxShadow: 'none' }
*/
export const getGhostStyleOverrides = (): React.CSSProperties => {
export const getGhostStyleOverrides = (fontStyles?: React.CSSProperties): React.CSSProperties => {
return {
...fontStyles,
background: 'transparent',
backgroundColor: 'transparent',
border: 'none',
boxShadow: 'none',
color: fontStyles?.color ?? '#000',
};
};

Expand Down
Loading