refactor: move styles from page to Avatar Group component
This commit is contained in:
parent
d9779c10bd
commit
bc23361fb0
@ -77,7 +77,7 @@ export const DisplaySigit = ({ meta, parsedMeta }: SigitProps) => {
|
||||
{submittedBy && signers.length ? (
|
||||
<Divider orientation="vertical" flexItem />
|
||||
) : null}
|
||||
<UserAvatarGroup className={styles.signers} max={7}>
|
||||
<UserAvatarGroup max={7}>
|
||||
{signers.map((signer) => {
|
||||
const pubkey = npubToHex(signer)!
|
||||
const profile = profiles[pubkey]
|
||||
|
@ -93,26 +93,6 @@
|
||||
grid-gap: 10px;
|
||||
}
|
||||
|
||||
.signers {
|
||||
padding: 0 0 0 10px;
|
||||
|
||||
> * {
|
||||
transition: margin ease 0.2s;
|
||||
margin: 0 0 0 -10px;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
&:first-child {
|
||||
margin-left: -10px !important;
|
||||
}
|
||||
}
|
||||
|
||||
> *:hover,
|
||||
> *:focus-within {
|
||||
margin: 0 15px 0 5px;
|
||||
z-index: 2;
|
||||
}
|
||||
}
|
||||
|
||||
.details {
|
||||
color: rgba(0, 0, 0, 0.3);
|
||||
font-size: 14px;
|
||||
|
@ -28,7 +28,7 @@ export const UserAvatarGroup = ({
|
||||
|
||||
const childrenArray = Children.toArray(children)
|
||||
return (
|
||||
<div {...rest}>
|
||||
<div className={styles.container} {...rest}>
|
||||
{surplus > 1
|
||||
? childrenArray.slice(0, surplus * -1).map((c) => c)
|
||||
: children}
|
||||
|
@ -1,5 +1,25 @@
|
||||
@import '../../styles/colors.scss';
|
||||
|
||||
.container {
|
||||
padding: 0 0 0 10px;
|
||||
|
||||
> * {
|
||||
transition: margin ease 0.2s;
|
||||
margin: 0 0 0 -10px;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
&:first-child {
|
||||
margin-left: -10px !important;
|
||||
}
|
||||
}
|
||||
|
||||
> *:hover,
|
||||
> *:focus-within {
|
||||
margin: 0 15px 0 5px;
|
||||
z-index: 2;
|
||||
}
|
||||
}
|
||||
|
||||
.icon {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
|
Loading…
Reference in New Issue
Block a user