mirror of
https://github.com/bendtherules/piktochart-create-editor.git
synced 2026-08-18 22:02:56 +00:00
Complete DragContainer and DraggableNode components + Helpers
This commit is contained in:
@@ -1,19 +1,29 @@
|
||||
import * as React from 'react';
|
||||
import './CreateEditorApp.css';
|
||||
import { DragContainer } from '../DragContainer';
|
||||
import { DraggableNode } from '../DraggableNode';
|
||||
|
||||
const logo = require('./logo.svg');
|
||||
|
||||
export class CreateEditorApp extends React.Component {
|
||||
logFn() {
|
||||
// tslint:disable-next-line:no-console
|
||||
console.log(arguments);
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
<div className="App">
|
||||
<DraggableNode>
|
||||
<DragContainer id="test">
|
||||
<header className="App-header">
|
||||
<img src={logo} className="App-logo" alt="logo" />
|
||||
<h1 className="App-title">Welcome to React</h1>
|
||||
<DraggableNode id="test-img" containerId="test">
|
||||
<img src={logo} className="App-logo" alt="logo" draggable={false} />
|
||||
</DraggableNode>
|
||||
<DraggableNode id="test-text" containerId="test">
|
||||
<h1 className="App-title">Welcome to React</h1>
|
||||
</DraggableNode>
|
||||
</header>
|
||||
</DraggableNode>
|
||||
</DragContainer>
|
||||
<p className="App-intro">
|
||||
To get started, edit <code>src/App.tsx</code> and save to reload.
|
||||
</p>
|
||||
|
||||
Reference in New Issue
Block a user