Skip to content
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

Button Component: Unify frontend render #61

Merged
merged 3 commits into from
Nov 16, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions assets/admin-global.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ body.admin_page_mojo-theme-preview .wp-full-overlay-sidebar{
}

.components-button.bluehost {
padding: 0.5rem 1rem;
padding: 8px 16px !important;
border: 0;
text-shadow: none;
box-shadow: none;
Expand All @@ -17,10 +17,9 @@ body.admin_page_mojo-theme-preview .wp-full-overlay-sidebar{
text-decoration: none; }
.components-button.bluehost.is-primary {
border-color: #006a95 #00648c #00648c;
box-shadow: inset 0 -1px 0 #00648c;
color: #fff;
text-decoration: none;
text-shadow: 0 -1px 1px #005d82, 1px 0 1px #005d82, 0 1px 1px #005d82, -1px 0 1px #005d82;
text-shadow: none !important;
border: 1px solid transparent;
background: #3575d3; }
.components-button.bluehost.is-primary:visited {
Expand Down
28 changes: 18 additions & 10 deletions src/app/components/atoms/bwa-button/style.scss
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
@import "@app/config.scss";

body .components-button.bluehost {
body *.components-button.bluehost {
padding: 0.5rem 1rem;
border: 0;
text-shadow: none;
box-shadow: none;
text-shadow: none !important;
box-shadow: none !important;
height: auto;
font-size: 16px;
font-weight: 600;
font-weight: 600 !important;
text-decoration: none;
margin-left: 8px;
-webkit-transition: all 0.08s ease;
transition: all 0.08s ease;

&[disabled] {
pointer-events: none;
Expand All @@ -20,38 +22,44 @@ body .components-button.bluehost {
background: $color-primary;
box-shadow: none;
color: #fff;
&:hover, &:active, &:visited, &:focus, &:not(:disabled):not([aria-disabled=true]):hover {
&:visited, &:focus, &:not(:disabled):not([aria-disabled=true]):hover {
background: $color-primary;
color: #fff;
}
&:hover, &:active, &:focus {
background: $color-dark-blue !important;
}
}

&.is-secondary {
border: 1px solid $color-primary;
background: transparent;
background: transparent !important;
box-shadow: none;
color: $color-primary;
&:hover, &:active, &:visited, &:focus, &:not(:disabled):not([aria-disabled=true]):hover {
&:visited, &:focus, &:not(:disabled):not([aria-disabled=true]):hover {
color: $color-primary;
border-color: $color-primary;
}
&:hover, &:active, &:focus {
background-color: $color-primary !important;
color: $color-white !important;
}
}

&.is-link {
font-weight: 300;
color: $color-primary;

&:hover {
color: $color-primary;
text-decoration: underline;
color: $color-dark-blue !important;
text-decoration: none !important;
}
}

&.is-default {
background: transparent;
border: 1px solid $color-primary;
color: $color-primary;
box-shadow: none;

&:hover {
background: $color-primary;
Expand Down
2 changes: 1 addition & 1 deletion src/app/config.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ $font: 'Open Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxyge
// Colors
$colors: (
blue: #2C6CC9,
dark-blue: #16325b,
dark-blue: #2A5DA8,
green: #17b212,
orange: #f89c24,
yellow: #f89c24,
Expand Down
10 changes: 5 additions & 5 deletions src/app/pages/blue-sky/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const BlueSky = () => {
{ __('We understand that WordPress can be challenging, but with professional help in your pocket, you will learn how to build, grow, and maintain your new WordPress website with friendly and professional guidance every step of the way.', 'bluehost-wordpress-plugin') }
</p>
</div>
<Button className="media-block__button" href="tel:8442118705" isLink isPrimary>
<Button className="media-block__button" href="tel:8442118705" isPrimary>
{ __('Call to get started', 'bluehost-wordpress-plugin') }
</Button>
</div>
Expand All @@ -62,7 +62,7 @@ const BlueSky = () => {
{ __('Get unstuck with fast answers and recommendations.', 'bluehost-wordpress-plugin') }
</div>
<div className="product-card__call-to-action">
<Button href="tel:8442118705" isLink isPrimary>
<Button href="tel:8442118705" isPrimary>
{ __('Call to get started', 'bluehost-wordpress-plugin') }
</Button>
</div>
Expand All @@ -89,7 +89,7 @@ const BlueSky = () => {
{ __('Learn more WordPress skills and solve problems faster.', 'bluehost-wordpress-plugin') }
</div>
<div className="product-card__call-to-action">
<Button href="tel:8442118705" isLink isPrimary>
<Button href="tel:8442118705" isPrimary>
{ __('Call to get started', 'bluehost-wordpress-plugin') }
</Button>
</div>
Expand Down Expand Up @@ -122,7 +122,7 @@ const BlueSky = () => {
{ __('Build and Maintain with advanced features and improve as you go.', 'bluehost-wordpress-plugin') }
</div>
<div className="product-card__call-to-action">
<Button href="tel:8442118705" isLink isPrimary>
<Button href="tel:8442118705" isPrimary>
{ __('Call to get started', 'bluehost-wordpress-plugin') }
</Button>
</div>
Expand Down Expand Up @@ -396,7 +396,7 @@ const BlueSky = () => {
}
}
/>
<Button className="call-to-action__button" href="tel:8442118705" isLink isPrimary>
<Button className="call-to-action__button" href="tel:8442118705" isPrimary>
{ __('Call to get started', 'bluehost-wordpress-plugin') }
</Button>
</div>
Expand Down
7 changes: 1 addition & 6 deletions src/app/pages/help/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ const Help = () => {
<Button
className="chat-button"
href="https://helpchat.bluehost.com/"
isLink
isPrimary
>
{ __('Chat with us', 'bluehost-wordpress-plugin') } <ChatIcon className="chat-icon" />
Expand Down Expand Up @@ -47,7 +46,6 @@ const Help = () => {
<Button
className="media-block__button"
href="#/blue-sky"
isLink
isSecondary
onClick={
() => {
Expand Down Expand Up @@ -76,7 +74,6 @@ const Help = () => {
className="featured-service__button"
data-testid="full-service"
href="https://www.bluehost.com/solutions/full-service#full-service"
isLink
isSecondary
>
{ __('Learn more', 'bluehost-wordpress-plugin') }
Expand All @@ -94,7 +91,6 @@ const Help = () => {
className="featured-service__button"
data-testid="seo-services"
href="https://www.bluehost.com/solutions/full-service#seo-services"
isLink
isSecondary
>
{ __('Learn more', 'bluehost-wordpress-plugin') }
Expand All @@ -111,7 +107,6 @@ const Help = () => {
<Button
className="featured-service__button"
href="https://www.bluehost.com/solutions/full-service#request-form"
isLink
isSecondary
>
{ __('Request a consultation', 'bluehost-wordpress-plugin') }
Expand All @@ -130,7 +125,7 @@ const Help = () => {
<div className="resources-search">
<Search />
<div className="button-container">
<Button href="https://www.bluehost.com/resources/" isLink isSecondary>
<Button href="https://www.bluehost.com/resources/" isSecondary>
{ __('Visit resource center', 'bluehost-wordpress-plugin') }
</Button>
</div>
Expand Down
2 changes: 0 additions & 2 deletions src/app/pages/help/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,6 @@
}

.chat-button {
color: white !important;
text-shadow: none !important;
border-radius: 26px;
margin-left: auto;
}
Expand Down