Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
Rocket.Chat
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
RocketChat
Rocket.Chat
Commits
ff35376c
Unverified
Commit
ff35376c
authored
10 months ago
by
Douglas Fabris
Committed by
GitHub
10 months ago
Browse files
Options
Downloads
Patches
Plain Diff
fix: `GenericModal` with no ask again checkbox missing margin (#32414)
parent
3b06229b
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.changeset/weak-starfishes-fail.md
+5
-0
5 additions, 0 deletions
.changeset/weak-starfishes-fail.md
apps/meteor/client/components/GenericModal/withDoNotAskAgain.tsx
+7
-3
7 additions, 3 deletions
...teor/client/components/GenericModal/withDoNotAskAgain.tsx
with
12 additions
and
3 deletions
.changeset/weak-starfishes-fail.md
0 → 100644
+
5
−
0
View file @
ff35376c
---
'
@rocket.chat/meteor'
:
patch
---
Fixes the missing spacing on don
`
t ask again checkbox inside modals
This diff is collapsed.
Click to expand it.
apps/meteor/client/components/GenericModal/withDoNotAskAgain.tsx
+
7
−
3
View file @
ff35376c
import
{
Box
,
CheckBox
}
from
'
@rocket.chat/fuselage
'
;
import
{
Box
,
Label
,
CheckBox
}
from
'
@rocket.chat/fuselage
'
;
import
{
useUniqueId
}
from
'
@rocket.chat/fuselage-hooks
'
;
import
{
useUserPreference
,
useTranslation
,
useEndpoint
}
from
'
@rocket.chat/ui-contexts
'
;
import
type
{
FC
,
ReactElement
,
ComponentType
}
from
'
react
'
;
import
React
,
{
useState
}
from
'
react
'
;
...
...
@@ -23,6 +24,7 @@ function withDoNotAskAgain<T extends RequiredModalProps>(
):
FC
<
DoNotAskAgainProps
&
Omit
<
T
,
keyof
RequiredModalProps
>>
{
const
WrappedComponent
:
FC
<
DoNotAskAgainProps
&
Omit
<
T
,
keyof
RequiredModalProps
>>
=
function
({
onConfirm
,
dontAskAgain
,
...
props
})
{
const
t
=
useTranslation
();
const
dontAskAgainId
=
useUniqueId
();
const
dontAskAgainList
=
useUserPreference
<
DontAskAgainList
>
(
'
dontAskAgainList
'
);
const
{
action
,
label
}
=
dontAskAgain
;
...
...
@@ -49,8 +51,10 @@ function withDoNotAskAgain<T extends RequiredModalProps>(
{
...
props
}
dontAskAgain
=
{
<
Box
display
=
'flex'
flexDirection
=
'row'
>
<
CheckBox
checked
=
{
state
}
onChange
=
{
onChange
}
mie
=
{
4
}
name
=
'dont_ask_again'
/>
<
label
htmlFor
=
'dont_ask_again'
>
{
t
(
'
Dont_ask_me_again
'
)
}
</
label
>
<
CheckBox
id
=
{
dontAskAgainId
}
checked
=
{
state
}
onChange
=
{
onChange
}
name
=
'dont_ask_again'
/>
<
Label
color
=
'annotation'
fontScale
=
'p2'
mis
=
{
8
}
htmlFor
=
{
dontAskAgainId
}
>
{
t
(
'
Dont_ask_me_again
'
)
}
</
Label
>
</
Box
>
}
onConfirm
=
{
handleConfirm
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment