Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
}
private removeAnswer = () => {
const { state, index } = this.props
state.answers.remove(index)
}
private EditorUiContainer = styled.div({
float: 'right'
})
private ContentContainer = styled.div({
clear: 'both'
})
private RemoveButton = styled.button({
marginRight: '5px'
})
}
)
}
export const Controls = styled.div({
right: '0',
position: 'absolute',
top: '0',
transform: 'translate(50%, -5px)',
display: 'flex',
flexDirection: 'column',
alignItems: 'center'
})
export const ControlButton = styled.button({
borderRadius: '50%',
border: '1px solid rgba(5,51,51,0.95)',
width: '27px',
height: '27px',
outline: 'none',
textAlign: 'center',
background: 'rgba(51,51,51,0.95)',
color: 'white',
zIndex: 20,
'&:hover': {
background: '#469bff',
border: '1px solid #469bff'
}
})
export const DragHandler = styled.div({
import { StatefulPluginEditorProps } from '@edtr-io/core'
import { Icon, faPlus, faTimes, styled } from '@edtr-io/editor-ui'
import * as React from 'react'
import { DragDropContext, Droppable, Draggable } from 'react-beautiful-dnd'
import { EquationsRenderer } from './renderer'
import { equationsState } from '.'
const DraggableContainer = styled.div({
border: '1px solid #000',
margin: '10px',
background: 'lightgrey',
padding: '10px'
})
const RemoveButton = styled.button({
borderRadius: '50%',
outline: 'none',
width: '35px',
height: '35px',
border: 'none',
float: 'right',
background: 'transparent',
position: 'relative',
top: '-15px',
right: '-30px'
})
const ColWrapper = styled.div({
cursor: 'auto',
background: '#fff'
})
width: '35px',
height: '35px',
border: 'none',
float: 'right',
background: 'transparent',
position: 'relative',
top: '-15px',
right: '-30px'
})
const ColWrapper = styled.div({
cursor: 'auto',
background: '#fff'
})
const AddButton = styled.button({
borderRadius: '50%',
outline: 'none',
width: '35px',
height: '35px',
border: 'none',
margin: 'auto'
})
const AddButtonWrapper = styled.div({
textAlign: 'center'
})
export class EquationsEditor extends React.Component<
StatefulPluginEditorProps
> {
private addButton = () => {