Merge pull request #2247 from lbryio/style

fix: yrbl style on subscriptions page
This commit is contained in:
Sean Yesmunt 2019-01-31 11:53:08 -05:00 committed by GitHub
commit f4b1e42065
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 32 additions and 35 deletions

View file

@ -1,10 +1,10 @@
// @flow // @flow
import React from 'react'; import * as React from 'react';
import Native from 'native'; import Native from 'native';
type Props = { type Props = {
title: string, title: string,
subtitle: string, subtitle: string | React.Node,
type: string, type: string,
}; };

View file

@ -101,7 +101,7 @@ export default class FirstRun extends PureComponent<Props> {
<h1 className="card__title">{__('You Are Awesome!')}</h1> <h1 className="card__title">{__('You Are Awesome!')}</h1>
</header> </header>
<div className="card__content"> <div className="card__content">
<p>{__("Check out some of the neat files below me. I'll see you around!")}</p> <p>{__("Check out some of the neat content below me. I'll see you around!")}</p>
<div className="card__actions"> <div className="card__actions">
<Button button="primary" onClick={completeFirstRun} label={__('See You Later')} /> <Button button="primary" onClick={completeFirstRun} label={__('See You Later')} />
</div> </div>

View file

@ -1,8 +1,8 @@
// @flow // @flow
import React, { Fragment } from 'react'; import React, { Fragment } from 'react';
import Native from 'native';
import Button from 'component/button'; import Button from 'component/button';
import SuggestedSubscriptions from 'component/subscribeSuggested'; import SuggestedSubscriptions from 'component/subscribeSuggested';
import Yrbl from 'component/common/yrbl';
type Props = { type Props = {
showSuggested: boolean, showSuggested: boolean,
@ -23,40 +23,37 @@ export default (props: Props) => {
return ( return (
<Fragment> <Fragment>
<div className="yrbl-wrap"> <Yrbl
<img title={numberOfSubscriptions > 0 ? __('Woohoo!') : __('No subscriptions... yet.')}
alt="Friendly gerbil" subtitle={
className="subscriptions__gerbil" <React.Fragment>
src={Native.imagePath('gerbil-happy.png')} <p>
/> {showSuggested
<div className="card__content"> ? __('I hear these channels are pretty good.')
<h2 className="card__title"> : __("I'll tell you where the good channels are if you find me a wheel.")}
{numberOfSubscriptions > 0 ? __('Woohoo!') : __('No subscriptions... yet.')} </p>
</h2> {!showSuggested && (
<p className="card__subtitle">
{showSuggested
? __('I hear these channels are pretty good.')
: __("I'll tell you where the good channels are if you find me a wheel.")}
</p>
{!showSuggested && (
<div className="card__actions">
<Button button="primary" label={__('Explore')} onClick={doShowSuggestedSubs} />
</div>
)}
{showSuggested &&
numberOfSubscriptions > 0 && (
<div className="card__actions"> <div className="card__actions">
<Button <Button button="primary" label={__('Explore')} onClick={doShowSuggestedSubs} />
button="primary"
onClick={onFinish}
label={`${__('View your')} ${numberOfSubscriptions} ${
numberOfSubscriptions > 1 ? __('subscribed channels') : __('subscribed channel')
}`}
/>
</div> </div>
)} )}
</div> {showSuggested &&
</div> numberOfSubscriptions > 0 && (
<div className="card__actions">
<Button
button="primary"
onClick={onFinish}
label={`${__('View your')} ${numberOfSubscriptions} ${
numberOfSubscriptions > 1
? __('subscribed channels')
: __('subscribed channel')
}`}
/>
</div>
)}
</React.Fragment>
}
/>
{showSuggested && !loadingSuggested && <SuggestedSubscriptions />} {showSuggested && !loadingSuggested && <SuggestedSubscriptions />}
</Fragment> </Fragment>
); );