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

Changes 'blue' to 'indigo' in all AI components #21441

Merged
merged 9 commits into from
Jun 18, 2024
18 changes: 9 additions & 9 deletions packages/components/src/AIFixesButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,23 @@ const yoastPrimary100 = "#F3E5ED";
const yoastPrimary300 = "#CD82AB";
const yoastPrimary400 = "#B94986";
const yoastPrimary500 = "#A61E69";
const blue50 = "#EFF6FF";
const blue100 = "#DBEAFE";
const blue300 = "#93C5FD";
const blue500 = "#3B82F6";
const yoastIndigo50 = "#EEF2FF";
const yoastIndigo100 = "#E0E7FF";
const yoastIndigo300 = "#A5B4FC";
const yoastIndigo500 = "#6366F1";

const direction = "to bottom right";

const gradientEffect = {
defaultStateBackground: `linear-gradient(${direction}, ${yoastPrimary50}, ${blue50})`,
defaultStateBorder: `linear-gradient(${direction}, ${yoastPrimary300}, ${blue300}) 1`,
hoverStateBackground: `linear-gradient(${direction}, ${yoastPrimary100}, ${blue100})`,
pressedStateBackground: `linear-gradient(${direction}, ${yoastPrimary500}, ${blue500})`,
defaultStateBackground: `linear-gradient(${direction}, ${yoastPrimary50}, ${yoastIndigo50})`,
defaultStateBorder: `linear-gradient(${direction}, ${yoastPrimary300}, ${yoastIndigo300}) 1`,
hoverStateBackground: `linear-gradient(${direction}, ${yoastPrimary100}, ${yoastIndigo100})`,
pressedStateBackground: `linear-gradient(${direction}, ${yoastPrimary500}, ${yoastIndigo500})`,
};

const AIFixesButtonBase = styled( IconButtonBase )`
overflow: hidden;
border: ${ props => props.pressed ? "none" : "1px solid #A5B4FC" }; /*indigo-300*/
border: ${ props => props.pressed ? "none" : `1px solid ${yoastIndigo300}` }; /*indigo-300*/
background-image: ${ props => props.pressed
? gradientEffect.pressedStateBackground
: gradientEffect.defaultStateBackground } !important;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ exports[`the pressed IconAIFixesButton matches the snapshot 1`] = `
.c1 {
overflow: hidden;
border: none;
background-image: linear-gradient(to bottom right,#A61E69,#3B82F6) !important;
background-image: linear-gradient(to bottom right,#A61E69,#6366F1) !important;
box-shadow: inset 0 -2px 0 #B94986;
}

.c1:hover {
background-image: linear-gradient(to bottom right,#A61E69,#3B82F6) !important;
background-image: linear-gradient(to bottom right,#A61E69,#6366F1) !important;
}

<button
Expand Down Expand Up @@ -91,12 +91,12 @@ exports[`the unpressed IconAIFixesButton matches the snapshot 1`] = `
.c1 {
overflow: hidden;
border: 1px solid #A5B4FC;
background-image: linear-gradient(to bottom right,#FAF3F7,#EFF6FF) !important;
background-image: linear-gradient(to bottom right,#FAF3F7,#EEF2FF) !important;
box-shadow: 0 1px 0 rgba( 204,204,204,0.7 );
}

.c1:hover {
background-image: linear-gradient(to bottom right,#F3E5ED,#DBEAFE) !important;
background-image: linear-gradient(to bottom right,#F3E5ED,#E0E7FF) !important;
}

<button
Expand Down
10 changes: 5 additions & 5 deletions packages/js/src/ai-assessment-fixes/components/sparkles-icon.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,19 @@ import propTypes from "prop-types";
export const SparklesIcon = ( { pressed = false } ) => {
return (
<>
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<svg width="16" height="17" viewBox="0 0 16 17" fill="none" xmlns="http://www.w3.org/2000/svg">
<path
d="M3.33284 2V4.66667M1.99951 3.33333H4.66618M3.99951 11.3333V14M2.66618 12.6667H5.33284M8.66618 2L10.19 6.57143L13.9995 8L10.19 9.42857L8.66618 14L7.14237 9.42857L3.33284 8L7.14237 6.57143L8.66618 2Z"
stroke={ pressed ? "white" : "url(#paint0_linear_1208_188)" } strokeWidth="1.33333" strokeLinecap="round"
d="M3.33284 2.96991V5.63658M1.99951 4.30324H4.66618M3.99951 12.3032V14.9699M2.66618 13.6366H5.33284M8.66618 2.96991L10.19 7.54134L13.9995 8.96991L10.19 10.3985L8.66618 14.9699L7.14237 10.3985L3.33284 8.96991L7.14237 7.54134L8.66618 2.96991Z"
stroke={ pressed ? "white" : "url(#paint0_linear_1538_754)" } strokeWidth="1.33333" strokeLinecap="round"
strokeLinejoin="round"
/>
<defs>
<linearGradient
id="paint0_linear_1208_188" x1="0" y1="0" x2="16" y2="16"
id="paint0_linear_1538_754" x1="1.99951" y1="2.96991" x2="15.3308" y2="4.69764"
gradientUnits="userSpaceOnUse"
>
<stop stopColor="#A61E69" />
<stop offset="1" stopColor="#3B82F6" />
<stop offset="1" stopColor="#6366F1" />
</linearGradient>
</defs>
</svg>
mykola marked this conversation as resolved.
Show resolved Hide resolved
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,33 +4,33 @@ exports[`SparklesIcon should render the SparklesIcon component when pressed is f
<div>
<svg
fill="none"
height="16"
viewBox="0 0 16 16"
height="17"
viewBox="0 0 16 17"
width="16"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M3.33284 2V4.66667M1.99951 3.33333H4.66618M3.99951 11.3333V14M2.66618 12.6667H5.33284M8.66618 2L10.19 6.57143L13.9995 8L10.19 9.42857L8.66618 14L7.14237 9.42857L3.33284 8L7.14237 6.57143L8.66618 2Z"
stroke="url(#paint0_linear_1208_188)"
d="M3.33284 2.96991V5.63658M1.99951 4.30324H4.66618M3.99951 12.3032V14.9699M2.66618 13.6366H5.33284M8.66618 2.96991L10.19 7.54134L13.9995 8.96991L10.19 10.3985L8.66618 14.9699L7.14237 10.3985L3.33284 8.96991L7.14237 7.54134L8.66618 2.96991Z"
stroke="url(#paint0_linear_1538_754)"
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="1.33333"
/>
<defs>
<lineargradient
gradientUnits="userSpaceOnUse"
id="paint0_linear_1208_188"
x1="0"
x2="16"
y1="0"
y2="16"
id="paint0_linear_1538_754"
x1="1.99951"
x2="15.3308"
y1="2.96991"
y2="4.69764"
>
<stop
stop-color="#A61E69"
/>
<stop
offset="1"
stop-color="#3B82F6"
stop-color="#6366F1"
/>
</lineargradient>
</defs>
Expand All @@ -42,13 +42,13 @@ exports[`SparklesIcon should render the SparklesIcon component when pressed is t
<div>
<svg
fill="none"
height="16"
viewBox="0 0 16 16"
height="17"
viewBox="0 0 16 17"
width="16"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M3.33284 2V4.66667M1.99951 3.33333H4.66618M3.99951 11.3333V14M2.66618 12.6667H5.33284M8.66618 2L10.19 6.57143L13.9995 8L10.19 9.42857L8.66618 14L7.14237 9.42857L3.33284 8L7.14237 6.57143L8.66618 2Z"
d="M3.33284 2.96991V5.63658M1.99951 4.30324H4.66618M3.99951 12.3032V14.9699M2.66618 13.6366H5.33284M8.66618 2.96991L10.19 7.54134L13.9995 8.96991L10.19 10.3985L8.66618 14.9699L7.14237 10.3985L3.33284 8.96991L7.14237 7.54134L8.66618 2.96991Z"
stroke="white"
stroke-linecap="round"
stroke-linejoin="round"
Expand All @@ -57,18 +57,18 @@ exports[`SparklesIcon should render the SparklesIcon component when pressed is t
<defs>
<lineargradient
gradientUnits="userSpaceOnUse"
id="paint0_linear_1208_188"
x1="0"
x2="16"
y1="0"
y2="16"
id="paint0_linear_1538_754"
x1="1.99951"
x2="15.3308"
y1="2.96991"
y2="4.69764"
>
<stop
stop-color="#A61E69"
/>
<stop
offset="1"
stop-color="#3B82F6"
stop-color="#6366F1"
/>
</lineargradient>
</defs>
Expand Down
Loading