Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix/#367-improved dialog styles on text-editor popup #425

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
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
export const dialogStyles = {
paper: {
padding: 2,
borderRadius: 4,
},
title: {
padding: 0,
},
content: {
padding: 0,
paddingBottom: 2,
overflow: "hidden",
},
actions: {
paddingBottom: 0,
paddingRight: 0,
},
};
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
} from "@mui/material";
import Button from "../../Button/Button";
import CustomTextField from "../../TextFieldComponents/CustomTextField/CustomTextField";
import { dialogStyles } from "./DialogStyles";

const LinkDialog = ({
open,
Expand All @@ -18,17 +19,25 @@ const LinkDialog = ({
handleOpenLink = () => {},
}) => {
return (
<Dialog open={open} onClose={handleClose}>
<DialogTitle>{isLinkActive ? "Edit Link" : "Add Link"}</DialogTitle>
<DialogContent>
<Dialog
PaperProps={{
sx: dialogStyles.paper,
}}
open={open}
onClose={handleClose}
>
<DialogTitle sx={dialogStyles.title}>
{isLinkActive ? "Edit Link" : "Add Link"}
</DialogTitle>
<DialogContent sx={dialogStyles.content}>
<CustomTextField
type="url"
placeholder="https://"
value={url}
onChange={(e) => setUrl(e.target.value)}
/>
</DialogContent>
<DialogActions>
<DialogActions sx={dialogStyles.actions}>
{isLinkActive && (
<Button
text="Open Link"
Expand Down
Loading