Skip to content

Commit

Permalink
Merge pull request #5929 from blockchain/GROWUX-1112
Browse files Browse the repository at this point in the history
fix(kyc): dropdown fields now don't overlap with inputs
  • Loading branch information
mperdomo-bc authored Jul 6, 2023
2 parents 47db9ea + e1d8654 commit c9ad0f1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
import React from 'react'
import styled from 'styled-components'

// Z-INDEX because otherwise the dropdown menu will be behind other inputs when present
const Wrapper = styled.div`
position: relative;
width: ${(props) => props.width || '100%'};
`
const FormGroup = (props) => {
const { children, ...rest } = props
div.bc__menu {
z-index: 900;
}
`

return <Wrapper {...rest}>{children}</Wrapper>
}
const FormGroup = ({ children, ...rest }) => <Wrapper {...rest}>{children}</Wrapper>

export default FormGroup
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ const Success: React.FC<InjectedFormProps<{}, Props> & Props> = (props) => {
title: getFormattedMessageComponent(node.id)
}
return (
<FormGroup>
<FormGroup key={node.id}>
<QuestionTitle>{nodeTranslation.title}</QuestionTitle>

<QuestionDescription>{nodeTranslation.instructions}</QuestionDescription>
Expand Down Expand Up @@ -311,7 +311,7 @@ const Success: React.FC<InjectedFormProps<{}, Props> & Props> = (props) => {

return (
<>
<FormGroup>
<FormGroup key={node.id}>
<QuestionTitle>{nodeTranslation.title}</QuestionTitle>

<QuestionDescription>{nodeTranslation.instructions}</QuestionDescription>
Expand Down Expand Up @@ -391,7 +391,7 @@ const Success: React.FC<InjectedFormProps<{}, Props> & Props> = (props) => {
}

return (
<FormGroup>
<FormGroup key={node.id}>
<QuestionTitle>{nodeTranslation.title}</QuestionTitle>

{displayInstructions && (
Expand Down Expand Up @@ -461,7 +461,7 @@ const Success: React.FC<InjectedFormProps<{}, Props> & Props> = (props) => {
const isOptional = node.children && node.children.some((item) => item.id.includes('UNDEFINED'))

return (
<FormGroup>
<FormGroup key={node.id}>
<QuestionTitle>
{nodeTranslation.title !== '' ? nodeTranslation.title : node.text}
</QuestionTitle>
Expand Down

0 comments on commit c9ad0f1

Please sign in to comment.