Skip to content
This repository has been archived by the owner on Jan 9, 2023. It is now read-only.

Commit

Permalink
Merge pull request #448 from kevinhaube/kevinhaube/modal-styling
Browse files Browse the repository at this point in the history
feat(modal): styling with props
  • Loading branch information
matteovivona authored May 31, 2020
2 parents 8fb1241 + 7f2cf11 commit a1bb4fd
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/components/Modal/Modal.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { ReactNode } from 'react'
import React, { ReactNode, CSSProperties } from 'react'
import BootstrapModal from 'react-bootstrap/Modal'

import { Button, Props as ButtonProps } from '../Button'
Expand Down Expand Up @@ -40,6 +40,14 @@ interface Props {
* Optional success button properties.
* */
successButton?: ButtonProps
/**
* Styling through CSS classes
*/
className?: string
/**
* Styilng through inline CSSProperties
*/
style?: CSSProperties
}

/**
Expand All @@ -58,10 +66,14 @@ const Modal = (props: Props) => {
closeButton,
middleButton,
successButton,
className,
style,
} = props

return (
<BootstrapModal
dialogClassName={className}
style={style}
autoFocus
centered={verticallyCentered}
keyboard
Expand Down

0 comments on commit a1bb4fd

Please sign in to comment.