Skip to content

Commit

Permalink
chore: Close Button always visible for Modal Header
Browse files Browse the repository at this point in the history
  • Loading branch information
ape-fede committed Nov 23, 2022
1 parent 07a2a47 commit 71e1887
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions src/widgets/Modal/ModalHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,21 @@ import { Divider } from "../../components/Divider";
const ModalHeader: React.FC<InternalProps> = ({ children, onDismiss, ...props }) => {
return (
<>
<Flex {...props} sx={style.modalHead}>
{children}
<IconButton icon="close" color="text" variant="transparent" onClick={onDismiss} />
</Flex>
<Divider />
{children && (
<>
<Flex {...props} sx={style.modalHead}>
{children}
</Flex>
<Divider />
</>
)}
<IconButton
icon="close"
color="text"
variant="transparent"
onClick={onDismiss}
sx={{ position: "absolute", right: "20px", top: "25px" }}
/>
</>
);
};
Expand Down

0 comments on commit 71e1887

Please sign in to comment.