-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: reorganise feedback component folder (#3837)
- Loading branch information
Showing
11 changed files
with
91 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import Box from "@mui/material/Box"; | ||
import { styled } from "@mui/material/styles"; | ||
|
||
export const FeedbackWrapper = styled(Box)(({ theme }) => ({ | ||
backgroundColor: theme.palette.background.paper, | ||
borderTop: `1px solid ${theme.palette.border.main}`, | ||
})); | ||
|
||
export const FeedbackRow = styled(Box)(({ theme }) => ({ | ||
maxWidth: theme.breakpoints.values.formWrap, | ||
padding: theme.spacing(2, 0, 4), | ||
})); | ||
|
||
export const FeedbackHeader = styled(Box)(({ theme }) => ({ | ||
padding: theme.spacing(1, 0), | ||
position: "relative", | ||
display: "flex", | ||
justifyContent: "space-between", | ||
alignItems: "center", | ||
})); | ||
|
||
export const FeedbackTitle = styled(Box)(({ theme }) => ({ | ||
position: "relative", | ||
display: "flex", | ||
alignItems: "center", | ||
"& svg": { | ||
width: "28px", | ||
height: "auto", | ||
color: theme.palette.primary.dark, | ||
marginRight: theme.spacing(1), | ||
}, | ||
})); | ||
|
||
export const CloseButton = styled("div")(({ theme }) => ({ | ||
display: "flex", | ||
alignItems: "center", | ||
justifyContent: "flex-end", | ||
color: theme.palette.text.primary, | ||
})); | ||
|
||
export const FeedbackBody = styled(Box)(({ theme }) => ({ | ||
maxWidth: theme.breakpoints.values.formWrap, | ||
})); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import SvgIcon from "@mui/material/SvgIcon"; | ||
|
||
export type UserFeedback = { | ||
userContext?: string; | ||
userComment: string; | ||
}; | ||
|
||
export interface FormProps { | ||
inputs: FeedbackFormInput[]; | ||
handleSubmit: (values: UserFeedback) => void; | ||
} | ||
|
||
export type FeedbackFormInput = { | ||
name: keyof UserFeedback; | ||
label: string; | ||
id: string; | ||
}; | ||
export type FeedbackCategory = "issue" | "idea" | "comment" | "inaccuracy"; | ||
export type View = "banner" | "triage" | FeedbackCategory | "thanks"; | ||
export type ClickEvents = "close" | "back" | "triage" | FeedbackCategory; | ||
|
||
export interface TitleAndCloseProps { | ||
title: string; | ||
Icon?: typeof SvgIcon; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters