mirror of
https://github.com/Unleash/unleash.git
synced 2025-03-23 00:16:25 +01:00
feat: add click away handler to sidebar content (#5751)
Does what it says on the can
This commit is contained in:
parent
ff96563742
commit
5582339560
@ -1,6 +1,7 @@
|
||||
import {
|
||||
Box,
|
||||
Button,
|
||||
ClickAwayListener,
|
||||
IconButton,
|
||||
styled,
|
||||
TextField,
|
||||
@ -257,6 +258,7 @@ export const FeedbackComponent = ({
|
||||
condition={showFeedback}
|
||||
show={
|
||||
<ParentContainer>
|
||||
<ClickAwayListener onClickAway={() => closeFeedback()}>
|
||||
<StyledContainer>
|
||||
<Tooltip title='Close' arrow>
|
||||
<StyledCloseButton
|
||||
@ -284,17 +286,23 @@ export const FeedbackComponent = ({
|
||||
<FormTitle>{feedbackData.title}</FormTitle>
|
||||
<StyledScoreContainer>
|
||||
<StyledScoreInput>
|
||||
{[1, 2, 3, 4, 5, 6, 7].map((score) => (
|
||||
<StyledScoreValue key={score}>
|
||||
{[1, 2, 3, 4, 5, 6, 7].map(
|
||||
(score) => (
|
||||
<StyledScoreValue
|
||||
key={score}
|
||||
>
|
||||
<input
|
||||
type='radio'
|
||||
name='difficultyScore'
|
||||
value={score}
|
||||
onChange={onScoreChange}
|
||||
onChange={
|
||||
onScoreChange
|
||||
}
|
||||
/>
|
||||
<span>{score}</span>
|
||||
</StyledScoreValue>
|
||||
))}
|
||||
),
|
||||
)}
|
||||
</StyledScoreInput>
|
||||
<ScoreHelpContainer>
|
||||
<StyledScoreHelp>
|
||||
@ -320,14 +328,17 @@ export const FeedbackComponent = ({
|
||||
InputLabelProps={{
|
||||
style: {
|
||||
fontSize:
|
||||
theme.fontSizes.smallBody,
|
||||
theme.fontSizes
|
||||
.smallBody,
|
||||
},
|
||||
}}
|
||||
/>
|
||||
</Box>
|
||||
<Box>
|
||||
<FormSubTitle>
|
||||
{feedbackData.areasForImprovementsLabel}
|
||||
{
|
||||
feedbackData.areasForImprovementsLabel
|
||||
}
|
||||
</FormSubTitle>
|
||||
<TextField
|
||||
placeholder='Your answer here'
|
||||
@ -338,7 +349,8 @@ export const FeedbackComponent = ({
|
||||
InputLabelProps={{
|
||||
style: {
|
||||
fontSize:
|
||||
theme.fontSizes.smallBody,
|
||||
theme.fontSizes
|
||||
.smallBody,
|
||||
},
|
||||
}}
|
||||
variant='outlined'
|
||||
@ -357,6 +369,7 @@ export const FeedbackComponent = ({
|
||||
</StyledForm>
|
||||
</StyledContent>
|
||||
</StyledContainer>
|
||||
</ClickAwayListener>
|
||||
</ParentContainer>
|
||||
}
|
||||
/>
|
||||
|
Loading…
Reference in New Issue
Block a user