Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 18 additions & 11 deletions src/Dropdown.js
Original file line number Diff line number Diff line change
@@ -1,26 +1,33 @@
/* @flow */

import React from 'react';
import type {Node as ReactNode} from 'react';
import PropTypes from 'prop-types';
import React from "react";
import type { Node as ReactNode } from "react";
import PropTypes from "prop-types";

type Props = {
children?: ReactNode;
children?: ReactNode,
className?: string,
style?: Object,
};

export default class Dropdown extends React.Component<Props> {
static propTypes = {
children: PropTypes.node
children: PropTypes.node,
className: PropTypes.string,
style: PropTypes.object,
};

render() {
var style = {
background: "white",
border: "1px solid rgba(0,0,0,.2)",
boxShadow: "0 2px 4px rgba(0,0,0,0.2)",
padding: "6px 0",
...(this.props.style || {}),
};

return (
<div style={{
background: 'white',
border: '1px solid rgba(0,0,0,.2)',
boxShadow: '0 2px 4px rgba(0,0,0,0.2)',
padding: '6px 0'
}}>
<div className={this.props.className} style={style}>
{this.props.children}
</div>
);
Expand Down