Remove SASS from components
This commit is contained in:
@@ -1,11 +1,29 @@
|
||||
import React from "react";
|
||||
import styled from "styled-components";
|
||||
import shortid from "shortid";
|
||||
import { DragDropContext, Droppable } from "react-beautiful-dnd";
|
||||
import { Question } from "."
|
||||
import AddIcon from "@assets/img/add-icon.png";
|
||||
import "./SignupQuestionsWidget.scss";
|
||||
import QuestionList from "./QuestionList";
|
||||
|
||||
const Widget = styled.div`
|
||||
& > button {
|
||||
display: flex;
|
||||
flex-flow: row nowrap;
|
||||
align-items: center;
|
||||
|
||||
background: none;
|
||||
padding: 0;
|
||||
margin: 1rem 0;
|
||||
|
||||
& > img {
|
||||
margin-right: 8px;
|
||||
margin-top: -2px;
|
||||
width: 20px;
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
interface SignupQuestionsWidgetProps {
|
||||
value: string;
|
||||
onChange: (value: string) => void;
|
||||
@@ -44,7 +62,7 @@ const SignupQuestionsWidget: React.FC<SignupQuestionsWidgetProps> = ({ value, on
|
||||
const questions = JSON.parse(value) as Question[];
|
||||
|
||||
return (
|
||||
<div className="signup-questions-widget">
|
||||
<Widget>
|
||||
<DragDropContext
|
||||
onDragEnd={handleDragEnd(questions)}
|
||||
onDragStart={onFocus}
|
||||
@@ -60,10 +78,10 @@ const SignupQuestionsWidget: React.FC<SignupQuestionsWidgetProps> = ({ value, on
|
||||
)}
|
||||
</Droppable>
|
||||
</DragDropContext>
|
||||
<button type="button" className="add-link" onClick={handleNewRowClick(questions)}>
|
||||
<button type="button" onClick={handleNewRowClick(questions)}>
|
||||
<img src={AddIcon} /> New Question
|
||||
</button>
|
||||
</div>
|
||||
</Widget>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user