Skip to content

Commit

Permalink
Merge branch 'main' into feat-adding-mode-prop-to-all-components
Browse files Browse the repository at this point in the history
  • Loading branch information
aversini committed Mar 5, 2024
2 parents e1e3775 + a411cbb commit f5224ab
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"packages/ui-components": "5.3.0",
"packages/ui-hooks": "2.2.0",
"packages/ui-system": "1.0.1",
"packages/ui-private": "1.1.0",
"packages/ui-private": "1.2.0",
"packages/ui-icons": "1.1.0",
"packages/ui-plugins": "1.0.0"
}
7 changes: 7 additions & 0 deletions packages/ui-private/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## [1.2.0](https://github.com/aversini/ui-components/compare/ui-private-v1.1.0...ui-private-v1.2.0) (2024-03-05)


### Features

* **Modal:** adding prop className to ModalClose ([#372](https://github.com/aversini/ui-components/issues/372)) ([fbadadb](https://github.com/aversini/ui-components/commit/fbadadb949bdc4816e4553eff0cea95403cc6444))

## [1.1.0](https://github.com/aversini/ui-components/compare/ui-private-v1.0.0...ui-private-v1.1.0) (2024-02-26)


Expand Down
2 changes: 1 addition & 1 deletion packages/ui-private/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@versini/ui-private",
"version": "1.1.0",
"version": "1.2.0",
"license": "MIT",
"author": "Arno Versini",
"publishConfig": {
Expand Down
7 changes: 4 additions & 3 deletions packages/ui-private/src/components/Modal/Modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,18 +107,19 @@ export const ModalClose = React.forwardRef<
HTMLButtonElement,
{
trigger: React.ReactElement;
className?: string;
}
>(function ModalClose(props, ref) {
const { setOpen } = useModalContext();
const { trigger, ...rest } = props;
const { trigger, className, ...rest } = props;
const handleClose = React.useCallback(() => setOpen(false), [setOpen]);
return (
<>
<div className={className}>
{React.cloneElement(trigger, {
ref,
onClick: handleClose,
...rest,
})}
</>
</div>
);
});

0 comments on commit f5224ab

Please sign in to comment.