I have a component which I want to use dragula on:
import React, { Component } from 'react';
import styles from './SomeComponent.scss';
import Dragula from 'react-dragula';
class SomeComponent extends Component{
render(){
let {children} = this.props
return(
<div className={styles['someClass']}>
<div ref={this.dragulaDecorator}>
{children}
</div>
</div>
)
}
dragulaDecorator = (componentBackingInstance) => {
if (componentBackingInstance) {
let options = { };
Dragula([componentBackingInstance], options);
}
};
}
When I try and use it, nothing appears to happen. When looking in Chromes Elements Inspector I can see it's creating the 'mirror' element and doing its thing, but the styles for the classes it's attaching to these elements are not loaded.
In the standard dragula docs it states that the styles must be imported, @import 'node_modules/dragula/dragula'
However, are these not supposed to auto load here when including the Dragula component? And if not what is the best way to get this in?
I have a component which I want to use dragula on:
When I try and use it, nothing appears to happen. When looking in Chromes Elements Inspector I can see it's creating the 'mirror' element and doing its thing, but the styles for the classes it's attaching to these elements are not loaded.
In the standard dragula docs it states that the styles must be imported, @import 'node_modules/dragula/dragula'
However, are these not supposed to auto load here when including the Dragula component? And if not what is the best way to get this in?