Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
students
survey
Commits
c2975ae3
Commit
c2975ae3
authored
Jul 22, 2022
by
jang dong hyeok
Browse files
accordion 수정
parent
de2221e7
Changes
3
Hide whitespace changes
Inline
Side-by-side
frontend/src/survey/Accordion.tsx
View file @
c2975ae3
...
...
@@ -14,17 +14,19 @@ const Accordion = ({ title, content }: AccordionProps) => {
setHeight
(
!
isOpened
?
`
${
contentElement
.
current
?.
scrollHeight
}
px`
:
"
0px
"
);
};
return
(
<
div
onClick
=
{
HandleOpening
}
className
=
"border border-indigo-400"
>
<
div
className
=
{
"
bg-themeColor p-4 flex justify-between text-white
"
}
>
<
h4
className
=
"font-semibold"
>
{
title
}
</
h4
>
{
isOpened
?
"
△
"
:
"
▽
"
}
</
div
>
<
div
ref
=
{
contentElement
}
style
=
{
{
height
:
height
}
}
className
=
"bg-gray-100 overflow-hidden transition-all duration-200"
>
<
p
className
=
"p-4"
>
{
content
}
</
p
>
<
div
className
=
"p-1"
>
<
div
onClick
=
{
HandleOpening
}
>
<
div
className
=
{
"
bg-themeColor p-4 flex justify-between text-white
"
}
>
<
h4
className
=
"font-semibold"
>
{
title
}
</
h4
>
{
isOpened
?
"
△
"
:
"
▽
"
}
</
div
>
<
div
ref
=
{
contentElement
}
style
=
{
{
height
:
height
}
}
className
=
"bg-gray-100 overflow-hidden transition-all duration-700"
>
<
p
className
=
"p-4"
>
{
content
}
</
p
>
</
div
>
</
div
>
</
div
>
);
...
...
frontend/src/survey/EditResultButton.tsx
View file @
c2975ae3
...
...
@@ -15,22 +15,38 @@ export const EditResultButton = () => {
return
(
<
div
>
<
div
className
=
"flex place-content-center"
>
<
div
className
=
"flex place-content-center
mt-6
"
>
<
NavLink
to
=
{
`/surveys/
${
surveyId
}
/edit`
}
style
=
{
({
isActive
})
=>
isActive
?
{
color
:
"
#58ACFA
"
}
:
{
color
:
"
black
"
}
isActive
?
{
color
:
"
white
"
,
backgroundColor
:
"
#58ACFA
"
,
}
:
{
borderBottomWidth
:
"
1px
"
,
borderColor
:
"
#58ACFA
"
,
}
}
>
<
div
className
=
"text-xl m-3
underline
"
>
설문지 수정
</
div
>
<
div
className
=
"text-xl m-3 "
>
설문지 수정
</
div
>
</
NavLink
>
<
NavLink
to
=
{
`/surveys/
${
surveyId
}
/result`
}
style
=
{
({
isActive
})
=>
isActive
?
{
color
:
"
#58ACFA
"
}
:
{
color
:
"
black
"
}
isActive
?
{
color
:
"
white
"
,
backgroundColor
:
"
#58ACFA
"
,
}
:
{
borderBottomWidth
:
"
1px
"
,
borderColor
:
"
#58ACFA
"
,
}
}
>
<
div
className
=
"text-xl m-3
underline
"
>
응답결과
</
div
>
<
div
className
=
"text-xl m-3"
>
응답결과
</
div
>
</
NavLink
>
</
div
>
<
Outlet
/>
...
...
frontend/src/survey/ResultSurvey.tsx
View file @
c2975ae3
...
...
@@ -5,7 +5,8 @@ export const ResultSurvey = () => {
const
data
=
[
{
title
:
"
1번질문
"
,
content
:
"
1번 답변들
"
,
content
:
"
1번 답변들asdfadsgsjadhfasld;nvaldkfnbljgnahgvlajnbl janl;nvja; sabv;jnsvjl;asjvh asjfagkfnjf;nvasgn va;sdn va sglanksvl ds af adb adf afg dgafbg dfh jbvlkna lkslbk kjv nbkkdlfn akdl nvjbnkdjf nlkbakdn bkjnakjn n knk
"
,
},
{
title
:
"
2번질문
"
,
...
...
@@ -27,7 +28,7 @@ export const ResultSurvey = () => {
</
div
>
</
div
>
<
div
className
=
"container
mx-auto
"
>
<
div
className
=
"container
w-11/12 place-self-center
"
>
{
data
.
map
((
item
)
=>
(
<
Accordion
title
=
{
item
.
title
}
content
=
{
item
.
content
}
/>
))
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment