Fakultas Ilmu Komputer UI
Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ppl-fasilkom-ui
PPL Sosial
tbcare
tbcare-web
Commits
d6b893da
Commit
d6b893da
authored
May 30, 2021
by
Sean Zeliq Urian
Browse files
[RED] Implement ActivityLog Scene
parent
9dc478bb
Changes
1
Show whitespace changes
Inline
Side-by-side
src/scenes/ActivityLog/index.tsx
View file @
d6b893da
import
React
from
'
react
'
;
import
React
,
{
useContext
,
useState
}
from
'
react
'
;
import
styled
,
{
ThemeContext
}
from
'
styled-components
'
;
import
{
Box
,
Content
,
CategoryButton
}
from
'
components
'
;
import
ActivityList
from
'
./components/ActivityList
'
;
import
ActivityTabel
from
'
./components/ActivityTabel
'
;
import
{
Box
}
from
'
components
'
;
import
ActivityLog
from
'
./components/ActivityLog
'
;
export
const
DEFAULT_THEME
=
{
colors
:
{
totallyWhite
:
'
white
'
,
mediumGray
:
'
gray
'
,
},
};
function
Home
()
{
function
ActivityLog
()
{
const
{
colors
}
=
useContext
(
ThemeContext
)
||
DEFAULT_THEME
;
const
[
isTable
,
setIsTable
]
=
useState
(
false
);
return
(
<
Box
width
=
"100%"
axis
=
{
Box
.
Axis
.
Vertical
}
>
<
ActivityLog
/>
<
Content
title
=
"Log Aktivitas"
>
<
Box
width
=
"100%"
padding
=
"24px 24px"
borderRadius
=
"3px"
background
=
{
colors
.
totallyWhite
}
axis
=
{
Box
.
Axis
.
Vertical
}
>
<
Box
width
=
"70%"
axis
=
{
Box
.
Axis
.
Horizontal
}
margin
=
"0 0 2em"
>
<
CategoryButton
width
=
"30%"
value
=
{
isTable
}
values
=
{
[
{
label
:
'
List
'
,
value
:
false
},
{
label
:
'
Tabel
'
,
value
:
true
}
]
}
onClick
=
{
setIsTable
}
/>
</
Box
>
{
isTable
?
<
ActivityTabel
/>
:
<
ActivityList
/>
}
</
Box
>
</
Content
>
);
}
export
default
Home
;
\ No newline at end of file
export
default
ActivityLog
;
\ No newline at end of file
Write
Preview
Supports
Markdown
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