Skip to content
Snippets Groups Projects
Commit 0783a15d authored by Tomasz Knapik's avatar Tomasz Knapik Committed by Todd Dembrey
Browse files

GH-983: Add changing a status

parent faad381d
No related branches found
No related tags found
No related merge requests found
from django.core.exceptions import PermissionDenied as DjangoPermissionDenied from django.core.exceptions import PermissionDenied as DjangoPermissionDenied
from django.db import transaction
from django.db.models import Q from django.db.models import Q
from rest_framework import generics, permissions from rest_framework import generics, permissions
from rest_framework.response import Response from rest_framework.response import Response
......
import React from 'react';
import PropTypes from 'prop-types';
export default class Modal extends React.Component {
static propTypes = {
heading: PropTypes.string,
content: PropTypes.node.isRequired,
visible: PropTypes.bool,
onClose: PropTypes.func,
}
get styles() {
const { visible } = this.props;
const modalStyle = {};
if (!visible) {
modalStyle['display'] = 'none';
}
return {
modal: {
...modalStyle
}
}
}
render() {
const { content, heading, onClose } = this.props;
return (
<div style={this.styles.modal}>
{onClose && <button onClick={onClose}>[X]</button>}
{heading && <h1>{heading}</h1>}
{content}
</div>
);
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment