-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(view): add Content in Summary Component
- Loading branch information
1 parent
e7ee3ee
commit 7c9dc0b
Showing
4 changed files
with
132 additions
and
1 deletion.
There are no files selected for viewing
98 changes: 98 additions & 0 deletions
98
packages/view/src/components/VerticalClusterList/Summary/Content/Content.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
|
||
.summary { | ||
display: flex; | ||
align-items: center; | ||
margin-top: 10px; | ||
margin-bottom: 10px; | ||
} | ||
|
||
.namebox { | ||
display: flex; | ||
height: 60px; | ||
flex-direction: column; | ||
} | ||
|
||
.name { | ||
display: flex; | ||
width: 30px; | ||
height: 30px; | ||
border-radius: 50px; | ||
font-weight: bold; | ||
background-color: #0077aa; | ||
color: white; | ||
justify-content: center; | ||
align-items: center; | ||
text-align: center; | ||
font-size: 15pt; | ||
margin: 0 0 5px 0; | ||
} | ||
|
||
.name:after { | ||
-webkit-transition: bottom .3s ease-in-out, opacity .3s ease-in-out; | ||
-moz-transition: bottom .3s ease-in-out, opacity .3s ease-in-out; | ||
transition: bottom .3s ease-in-out, opacity .3s ease-in-out; | ||
} | ||
|
||
.name:hover { | ||
display: flex; | ||
width: 40px; | ||
height: 40px; | ||
border-radius: 50px; | ||
font-weight: bold; | ||
background-color: #0077aa; | ||
color: #ffffff; | ||
justify-content: center; | ||
align-items: center; | ||
text-align: center; | ||
font-size: 15pt; | ||
margin: 0 0 5px 0; | ||
} | ||
|
||
[data-tooltip-text]:hover { | ||
position: relative; | ||
} | ||
|
||
[data-tooltip-text]:after { | ||
-webkit-transition: bottom .3s ease-in-out, opacity .3s ease-in-out; | ||
-moz-transition: bottom .3s ease-in-out, opacity .3s ease-in-out; | ||
transition: bottom .3s ease-in-out, opacity .3s ease-in-out; | ||
|
||
-webkit-box-shadow: 0px 0px 3px 1px rgba(50, 50, 50, 0.4); | ||
-moz-box-shadow: 0px 0px 3px 1px rgba(50, 50, 50, 0.4); | ||
box-shadow: 0px 0px 3px 1px rgba(50, 50, 50, 0.4); | ||
|
||
-webkit-border-radius: 5px; | ||
-moz-border-radius: 5px; | ||
border-radius: 5px; | ||
|
||
content: attr(data-tooltip-text); | ||
|
||
position: absolute; | ||
top: 90%; | ||
left: -9999px; | ||
|
||
|
||
color: #FFFFFF; | ||
font-size: 12px; | ||
margin-bottom: 10px; | ||
padding: 7px 12px; | ||
position: absolute; | ||
width: auto; | ||
min-width: max-content; | ||
word-wrap: break-word; | ||
|
||
opacity: 0; | ||
z-index: 9999; | ||
} | ||
|
||
[data-tooltip-text]:hover:after { | ||
left: 90%; | ||
background-color: rgba(0, 119, 170, 0.8); | ||
opacity: 1; | ||
} | ||
|
||
.message { | ||
display: flex; | ||
word-break: break-all; | ||
margin-left: 15px; | ||
} |
31 changes: 31 additions & 0 deletions
31
packages/view/src/components/VerticalClusterList/Summary/Content/Content.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import { nanoid } from "nanoid"; | ||
|
||
import type { IInfo } from "../Summary.type"; | ||
import "./Content.scss"; | ||
|
||
export const Content = ({ info }: IInfo) => { | ||
return ( | ||
<div className="box"> | ||
{info.names.map((v, i) => { | ||
return ( | ||
<p className="summary" key={`${nanoid()}`}> | ||
<span className="nameBox" key={`${nanoid()}`}> | ||
{v.map((a) => ( | ||
<span | ||
className="name" | ||
key={`${nanoid()}`} | ||
data-tooltip-text={a} | ||
> | ||
{a.slice(0, 1)} | ||
</span> | ||
))} | ||
</span> | ||
<span className="message" key={`${nanoid()}`}> | ||
{info.messages[i]} | ||
</span> | ||
</p> | ||
); | ||
})} | ||
</div> | ||
); | ||
}; |
1 change: 1 addition & 0 deletions
1
packages/view/src/components/VerticalClusterList/Summary/Content/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { Content } from "./Content"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters