How to use decentraland-ui - 2 common examples

To help you get started, we’ve selected a few decentraland-ui examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github decentraland / agora / webapp / src / components / PollDetailPage / PollDetailPage.tsx View on Github external
<Stats title={t('global.votes')}>
                <Header>{poll.votes.length}</Header>
              </Stats>
              {isFinished(poll) ? (
                <Stats title={t('poll_detail_page.stats.finished')}>
                  <Header>{formatDate(poll.closes_at)}</Header>
                </Stats>
              ) : (
                <Stats title={t('poll_detail_page.stats.time_left')}>
                  <Header>{distanceInWordsToNow(poll.closes_at, false)}</Header>
                </Stats>
              )}
            </div>

            <Responsive
              minWidth={(Responsive.onlyTablet.minWidth as number) + 1}
            >
              <>
                <div className="row main">
                  <div className="progress">
                    <PollProgress results={currentResults} />
                  </div>

                  <CastYourVote poll={poll} isConnected={isConnected} />
                </div>

                <div className="row sub">
                  <div className="options">
                    {currentResults.map((result, index) => (
                      <OptionOrb position={index} key={result.option.id}>
                        {result.option.value}
                      </OptionOrb>
github decentraland / agora / webapp / src / components / PollDetailPage / PollDetailPage.tsx View on Github external
values={{
                            sign_in_link: (
                              <Link to={locations.signIn()}>
                                {t('poll_detail_page.sign_in_link')}
                              </Link>
                            )
                          }}
                        />
                      )}
                    </p>
                  )}
                </div>
              </>
            </Responsive>

            <Responsive maxWidth={Responsive.onlyTablet.minWidth}>
              <div className="results">
                {currentResults.map((result, index) => (
                  <OptionBar
                    position={index}
                    percentage={result.percentage}
                    key={result.option.id}
                  >
                    {result.option.value}
                  </OptionBar>
                ))}
              </div>
              <CastYourVote poll={poll} isConnected={isConnected} />
              <YourVote vote={currentVote} poll={poll} />
            </Responsive>

            {noVotes ? null : (

decentraland-ui

Decentraland's UI components and styles

MIT
Latest version published 5 days ago

Package Health Score

79 / 100
Full package analysis

Popular decentraland-ui functions