Skip to content

Commit

Permalink
className prop
Browse files Browse the repository at this point in the history
  • Loading branch information
samirelanduk committed Jan 28, 2022
1 parent 2ac1e97 commit 8cfd6cb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Molstar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { PluginContext } from "molstar/lib/mol-plugin/context";

const Molstar = props => {

const { pdbId, url, dimensions, options } = props;
const { pdbId, url, dimensions, className } = props;
const parentRef = useRef(null);
const canvasRef = useRef(null);
const plugin = useRef(null);
Expand Down Expand Up @@ -33,7 +33,7 @@ const Molstar = props => {
const height = dimensions ? dimensions[1] : "100%";

return (
<div ref={parentRef} style={{position: "relative", width, height}}>
<div ref={parentRef} style={{position: "relative", width, height}} className={className || ""}>
<canvas
ref={canvasRef}
style={{position: "absolute", top: 0, left: 0, right: 0, bottom: 0}}
Expand All @@ -46,7 +46,7 @@ Molstar.propTypes = {
pdbId: PropTypes.string,
url: PropTypes.string,
dimensions: PropTypes.array,
options: PropTypes.object
className: PropTypes.string
};

export default Molstar;

0 comments on commit 8cfd6cb

Please sign in to comment.