Skip to content

Commit

Permalink
feat(proposals): add navigation button on iframe modal
Browse files Browse the repository at this point in the history
  • Loading branch information
envin3 committed Jan 9, 2024
1 parent 9433924 commit 6171b1c
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 1 deletion.
40 changes: 40 additions & 0 deletions public/assets/svg/left-arrow.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 13 additions & 1 deletion src/components/base/Modal/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import { Modal } from 'react-bootstrap'
import styled from 'styled-components'

import Text from '../Text'
import Button from '../Button'
import Icon from '../Icon'

const StyledModalTitle = styled(Text)`
font-size: 20px;
Expand Down Expand Up @@ -33,10 +35,20 @@ const StyledHeader = styled(Modal.Header)`
}
`

const MyModal = ({ show, title, children, size = 'lg', bodyStyle, onClose }) => {
const StyledButton = styled(Button)`
width: 50px;
margin-right: 10px;
`

const MyModal = ({ show, title, children, size = 'lg', bodyStyle, onClose, onClick, hasButton = false }) => {
return (
<Modal show={show} aria-labelledby="modal" size={size} centered onHide={onClose}>
<StyledHeader closeButton={Boolean(onClose)}>
{hasButton ? (
<StyledButton onClick={onClick}>
<Icon icon="left-arrow" />
</StyledButton>
) : null}
<StyledModalTitle>{title}</StyledModalTitle>
</StyledHeader>
<StyledBody style={bodyStyle}>{children}</StyledBody>
Expand Down

0 comments on commit 6171b1c

Please sign in to comment.