0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-17 23:44:39 -05:00

Maximised length of portal button text

no refs.
This commit is contained in:
Peter Zimon 2020-10-14 14:43:48 +02:00
parent 5b7b77a855
commit 548403dc03
4 changed files with 14 additions and 4 deletions

View file

@ -16,7 +16,7 @@ const DEV_MODE_DATA = {
showPopup: true, showPopup: true,
site: Fixtures.site, site: Fixtures.site,
member: Fixtures.member.paid, member: Fixtures.member.paid,
page: 'accountHome' page: 'signup'
}; };
export default class App extends React.Component { export default class App extends React.Component {
constructor(props) { constructor(props) {

View file

@ -155,7 +155,7 @@ class TriggerButtonContent extends React.Component {
} = this.context.site; } = this.context.site;
if (this.hasText()) { if (this.hasText()) {
return ( return (
<span style={{padding: '0 8px', color: '#fff'}}> {buttonText} </span> <span className='gh-portal-triggerbtn-label'> {buttonText} </span>
); );
} }
return null; return null;
@ -181,7 +181,7 @@ class TriggerButtonContent extends React.Component {
<div className='gh-portal-triggerbtn-wrapper' ref={this.container}> <div className='gh-portal-triggerbtn-wrapper' ref={this.container}>
<div className='gh-portal-triggerbtn-container with-label' onClick={e => this.onToggle(e)}> <div className='gh-portal-triggerbtn-container with-label' onClick={e => this.onToggle(e)}>
{this.renderTriggerIcon()} {this.renderTriggerIcon()}
{this.renderText()} {(hasText ? this.renderText() : '')}
</div> </div>
</div> </div>
); );

View file

@ -60,6 +60,16 @@ const TriggerButtonStyles = `
padding: 0 12px 0 16px; padding: 0 12px 0 16px;
} }
.gh-portal-triggerbtn-label {
padding: 8px;
color: rgb(255, 255, 255);
display: block;
white-space: nowrap;
max-width: 380px;
overflow: hidden;
text-overflow: ellipsis;
}
.gh-portal-avatar { .gh-portal-avatar {
margin-bottom: 0px !important; margin-bottom: 0px !important;
width: 60px; width: 60px;

View file

@ -17,7 +17,7 @@ export const site = {
portal_name: true, portal_name: true,
portal_plans: ['yearly'], portal_plans: ['yearly'],
portal_button_icon: 'icon-1', portal_button_icon: 'icon-1',
portal_button_signup_text: 'Subscribe now', portal_button_signup_text: 'Subscribe now this is a really long text that should not be the default but even though its still possible',
portal_button_style: 'icon-and-text', portal_button_style: 'icon-and-text',
members_support_address: 'support@example.com' members_support_address: 'support@example.com'
}; };