From 9d0584a07a72c19bb8e6b258e42797c83625e8b0 Mon Sep 17 00:00:00 2001 From: Justin Edmund Date: Fri, 30 Jun 2023 22:16:19 -0700 Subject: [PATCH] Extracted filter bar user info into a new component --- components/filters/UserInfo/index.module.scss | 46 +++++++++++++++++++ components/filters/UserInfo/index.tsx | 22 +++++++++ 2 files changed, 68 insertions(+) create mode 100644 components/filters/UserInfo/index.module.scss create mode 100644 components/filters/UserInfo/index.tsx diff --git a/components/filters/UserInfo/index.module.scss b/components/filters/UserInfo/index.module.scss new file mode 100644 index 00000000..4b0f4933 --- /dev/null +++ b/components/filters/UserInfo/index.module.scss @@ -0,0 +1,46 @@ +.root { + align-items: center; + display: flex; + flex-direction: row; + flex-grow: 1; + gap: $unit * 1.5; + + img { + $diameter: $unit * 6; + border-radius: calc($diameter / 2); + height: $diameter; + width: $diameter; + + &.gran { + background-color: #cee7fe; + } + + &.djeeta { + background-color: #ffe1fe; + } + + &.fire { + background: $fire-bg-20; + } + + &.water { + background: $water-bg-20; + } + + &.wind { + background: $wind-bg-20; + } + + &.earth { + background: $earth-bg-20; + } + + &.dark { + background: $dark-bg-10; + } + + &.light { + background: $light-bg-20; + } + } +} diff --git a/components/filters/UserInfo/index.tsx b/components/filters/UserInfo/index.tsx new file mode 100644 index 00000000..bb4838eb --- /dev/null +++ b/components/filters/UserInfo/index.tsx @@ -0,0 +1,22 @@ +import styles from './index.module.scss' + +interface Props { + user: User +} + +const UserInfo = ({ user }: Props) => { + return ( +
+ {user.avatar.picture} +

{user.username}

+
+ ) +} + +export default UserInfo