-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Corrigido o estilo do sidebar. #600
base: master
Are you sure you want to change the base?
Changes from all commits
6b9b0e9
184fbcf
a125bc4
8169b4f
41cf705
2f391be
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -84,55 +84,55 @@ | |
"userName": "Discord User 1", | ||
"token": "DISCORD_EXAMPLE_TOKEN_1", | ||
"valid": true, | ||
"avatar": "https://example.com/image1.jpg" | ||
"avatar": "https://cdn0.iconfinder.com/data/icons/free-social-media-set/24/discord-256.png" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. é pra usar o ícone de um arquivo local do projeto, vamos conversar sobre |
||
}, | ||
{ | ||
"id": "14", | ||
"socialMediaId": "TWITTER_EXAMPLE_ID", | ||
"userName": "Twitter User 14", | ||
"token": "TWITTER_EXAMPLE_TOKEN_14", | ||
"valid": true, | ||
"avatar": "https://example.com/image2.jpg" | ||
"avatar": "https://cdn2.iconfinder.com/data/icons/threads-by-instagram/24/x-logo-twitter-new-brand-contained-256.png" | ||
}, | ||
{ | ||
"id": "2", | ||
"socialMediaId": "DISCORD_EXAMPLE_ID", | ||
"userName": "Discord User 2", | ||
"token": "DISCORD_EXAMPLE_TOKEN_2", | ||
"valid": false, | ||
"avatar": "https://example.com/image3.jpg" | ||
"avatar": "https://cdn0.iconfinder.com/data/icons/free-social-media-set/24/discord-256.png" | ||
}, | ||
{ | ||
"id": "3", | ||
"socialMediaId": "DISCORD_EXAMPLE_ID", | ||
"userName": "Discord User 3", | ||
"token": "DISCORD_EXAMPLE_TOKEN_3", | ||
"valid": true, | ||
"avatar": "https://example.com/image4.jpg" | ||
"avatar": "https://cdn0.iconfinder.com/data/icons/free-social-media-set/24/discord-256.png" | ||
}, | ||
{ | ||
"id": "4", | ||
"socialMediaId": "TWITTER_EXAMPLE_ID", | ||
"userName": "Twitter User 4", | ||
"token": "TWITTER_EXAMPLE_TOKEN_4", | ||
"valid": false, | ||
"avatar": "https://example.com/image2.jpg" | ||
"avatar": "https://cdn2.iconfinder.com/data/icons/threads-by-instagram/24/x-logo-twitter-new-brand-contained-256.png" | ||
}, | ||
{ | ||
"id": "5", | ||
"socialMediaId": "DISCORD_EXAMPLE_ID", | ||
"userName": "Discord User 5", | ||
"token": "DISCORD_EXAMPLE_TOKEN_5", | ||
"valid": false, | ||
"avatar": "https://example.com/image6.jpg" | ||
"avatar": "https://cdn0.iconfinder.com/data/icons/free-social-media-set/24/discord-256.png" | ||
}, | ||
{ | ||
"id": "6", | ||
"socialMediaId": "TWITTER_EXAMPLE_ID", | ||
"userName": "Twitter User 6", | ||
"token": "TWITTER_EXAMPLE_TOKEN_6", | ||
"valid": true, | ||
"avatar": "https://example.com/image2.jpg" | ||
"avatar": "https://cdn2.iconfinder.com/data/icons/threads-by-instagram/24/x-logo-twitter-new-brand-contained-256.png" | ||
} | ||
], | ||
"social-medias": [ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
@use '~styles/global.scss' as *; | ||
|
||
.username { | ||
margin: 0; | ||
} | ||
|
||
Comment on lines
+3
to
+6
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. muito bom! deixou alinhadinho ao layout! |
||
.container { | ||
display: flex; | ||
flex-flow: row nowrap; | ||
|
@@ -9,7 +13,7 @@ | |
align-items: center; | ||
justify-content: space-between; | ||
|
||
padding: 0.8rem 0.8rem 0.8rem 1.6rem; | ||
padding: 0.8rem; | ||
|
||
border-bottom: 0.1rem solid $primaryGray; | ||
|
||
|
@@ -22,9 +26,8 @@ | |
|
||
.username { | ||
width: 100%; | ||
overflow: hidden; | ||
|
||
display: flex; | ||
overflow: hidden; | ||
wendesongomes marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
font-size: 1.4rem; | ||
text-overflow: ellipsis; | ||
|
@@ -40,13 +43,23 @@ | |
font-size: 1.4rem; | ||
} | ||
|
||
.containerButton { | ||
display: flex; | ||
gap: 0.9rem; | ||
} | ||
|
||
.avatar { | ||
wendesongomes marked this conversation as resolved.
Show resolved
Hide resolved
|
||
width: 40px; | ||
height: 40px; | ||
|
||
display: flex; | ||
|
||
flex-shrink: 0; | ||
|
||
align-items: center; | ||
|
||
justify-content: center; | ||
|
||
background-color: $primaryPurple; | ||
border-radius: 50%; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -65,8 +65,11 @@ | |
} | ||
|
||
.content { | ||
width: 100%; | ||
height: 100%; | ||
|
||
overflow: auto; | ||
|
||
flex-direction: column; | ||
} | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,10 @@ import Icon from '~components/Icon/Icon'; | |
|
||
import scss from './SocialAccordion.module.scss'; | ||
|
||
import iconPlaceholderForIcon from './assets/facebook.svg'; | ||
import discordIcon from './assets/discord.svg'; | ||
import facebookIcon from './assets/facebook.svg'; | ||
import instagramIcon from './assets/instagram.svg'; | ||
import xIcon from './assets/x.svg'; | ||
|
||
import { AccountQuantity } from './SocialAccordion.components'; | ||
import { SocialAccordionProps } from './SocialAccordion.type'; | ||
|
@@ -45,11 +48,26 @@ function SocialAccordion(props: SocialAccordionProps): ReactNode { | |
)); | ||
|
||
const renderAccordionContent = (): ReactNode => ( | ||
<ul role="listitem">{renderAccordionMap()}</ul> | ||
<ul className={scss.containerAccordion} role="listitem"> | ||
{renderAccordionMap()} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. não é mais assim no code-style atual, tem que colocar no .components |
||
</ul> | ||
); | ||
|
||
const hasInvalidAccount = props.accounts.some(({ valid }) => !valid); | ||
|
||
const iconMap = { | ||
discord: discordIcon, | ||
facebook: facebookIcon, | ||
instagram: instagramIcon, | ||
twitter: xIcon, | ||
x: xIcon, | ||
}; | ||
|
||
const socialMediaName = socialMedias | ||
.get(props.socialMediaId) | ||
?.name.toLowerCase(); | ||
const iconPath = iconMap[socialMediaName as keyof typeof iconMap]; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
|
||
return ( | ||
<Accordion | ||
className={scss.wrapper} | ||
|
@@ -64,11 +82,7 @@ function SocialAccordion(props: SocialAccordionProps): ReactNode { | |
> | ||
<div className={scss.header}> | ||
<div className={scss.socialInfo}> | ||
<img | ||
alt="social media" | ||
className={scss.icon} | ||
src={iconPlaceholderForIcon} | ||
/> | ||
<img alt="social media" className={scss.icon} src={iconPath} /> | ||
<span>{socialMedias.get(props.socialMediaId)?.name}</span> | ||
</div> | ||
{props.error && renderError()} | ||
|
@@ -85,7 +99,7 @@ function SocialAccordion(props: SocialAccordionProps): ReactNode { | |
} | ||
className={isOpen ? scss.rotateIconUp : scss.rotateIconDown} | ||
icon={isOpen ? 'triangle-drop-arrow' : 'triangle-left-arrow'} | ||
size={16} | ||
size={10} | ||
/> | ||
</div> | ||
</div> | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. isso não deve ficar aqui, todos os icons estão em src/components/Icons/icons, e já tem o do discord |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
e o ícone também não tá condizente com o do figma