-
Notifications
You must be signed in to change notification settings - Fork 92
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add the CommunityBubble component (#496)
* feat: Add the CommunityBubble component * fix: Styles
- Loading branch information
1 parent
fd9c466
commit ba0c6a0
Showing
6 changed files
with
67 additions
and
0 deletions.
There are no files selected for viewing
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,29 @@ | ||
.dui-community-bubble { | ||
display: flex; | ||
color: white; | ||
border-radius: 12px; | ||
padding: 10px 34px 10px 19px; | ||
background: #161518; | ||
align-items: center; | ||
gap: 15px; | ||
} | ||
|
||
.dui-community-bubble__icon { | ||
background-image: url('../../assets/discord.svg'); | ||
background-repeat: no-repeat; | ||
background-size: contain; | ||
height: 20px; | ||
width: 28px; | ||
filter: brightness(0) invert(1); | ||
} | ||
|
||
.dui-community-bubble__text--bold { | ||
font-weight: 600; | ||
} | ||
|
||
.dui-community-bubble__text { | ||
display: flex; | ||
flex-direction: column; | ||
color: white; | ||
font-size: 12px; | ||
} |
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,7 @@ | ||
export type CommunityBubbleProps = { | ||
className?: string | ||
i18n?: { | ||
title: string | ||
subtitle: string | ||
} | ||
} |
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,6 @@ | ||
import * as React from 'react' | ||
import { storiesOf } from '@storybook/react' | ||
|
||
import { CommunityBubble } from './CommunityBubble' | ||
|
||
storiesOf('CommunityBubble', module).add('Base', () => <CommunityBubble />) |
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,22 @@ | ||
import React from 'react' | ||
import { CommunityBubbleProps } from './CommunityBubble.props' | ||
import './CommunityBubble.css' | ||
import classNames from 'classnames' | ||
|
||
export const CommunityBubble = (props: CommunityBubbleProps) => { | ||
return ( | ||
<a | ||
className={classNames('dui-community-bubble', props.className)} | ||
href="https://decentraland.org/discord" | ||
target="about:blank" | ||
> | ||
<i className="dui-community-bubble__icon" /> | ||
<p className="dui-community-bubble__text"> | ||
<span>{props.i18n?.title ?? 'Need Guidance?'}</span> | ||
<span className="dui-community-bubble__text--bold"> | ||
{props.i18n?.subtitle ?? 'ASK THE COMMUNITY'} | ||
</span> | ||
</p> | ||
</a> | ||
) | ||
} |
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,2 @@ | ||
export * from './CommunityBubble.props' | ||
export * from './CommunityBubble' |
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
ba0c6a0
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.
Successfully deployed to the following URLs:
decentraland-ui – ./
decentraland-ui-git-master-decentraland1.vercel.app
decentraland-ui-decentraland1.vercel.app