Added modal opacity
This commit is contained in:
parent
8f8735ccce
commit
26cf7a74a2
2 changed files with 4 additions and 3 deletions
|
|
@ -8,6 +8,7 @@ interface Props {
|
|||
color?: string
|
||||
border?: string
|
||||
trigger: boolean
|
||||
opacity?: number
|
||||
}
|
||||
|
||||
export default (props: Props) => {
|
||||
|
|
@ -34,13 +35,13 @@ export default (props: Props) => {
|
|||
<Show when={props.trigger}>
|
||||
<div class="modal" ref={dialogRef} onClick={closeHandler}>
|
||||
<Show when={props.border}>
|
||||
<div class="modal__content" style={`background-color: ${props.background}; color: ${props.color}; border: 2px solid ${props.border}`}>
|
||||
<div class="modal__content" style={`background-color: ${props.background}; color: ${props.color}; border: 2px solid ${props.border}; opacity: ${props.opacity || 1}`}>
|
||||
{props.children}
|
||||
</div>
|
||||
</Show>
|
||||
|
||||
<Show when={!props.border}>
|
||||
<div class="modal__content" style={`background-color: ${props.background}; color: ${props.color}; box-shadow: 5px 4px 6px rgba(0, 0, 0, 0.5)`}>
|
||||
<div class="modal__content" style={`background-color: ${props.background}; color: ${props.color}; opacity: ${props.opacity || 1}; box-shadow: 5px 4px 6px rgba(0, 0, 0, 0.5)`}>
|
||||
{props.children}
|
||||
</div>
|
||||
</Show>
|
||||
|
|
|
|||
|
|
@ -229,7 +229,7 @@ export default () => {
|
|||
</Padding>
|
||||
</Page>
|
||||
|
||||
<Modal trigger={saved()} background="#d5e3f2f3" color="#181818e4">
|
||||
<Modal trigger={saved()} background="#ffffffff" color="#000000e4" opacity={0.4}>
|
||||
<Padding top={1} bottom={1} left={4} right={4}>
|
||||
<Column>
|
||||
<Row>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue