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

AI fixes buttons in the sidebar go blank #21439

Merged
Next Next commit
Refactors the sparkles icon
  • Loading branch information
Jordi-PV committed Jun 13, 2024
commit b96eb88d63e641c3dc75369a717de0fae987b389
12 changes: 12 additions & 0 deletions packages/js/src/ai-assessment-fixes/components/SparklesIcon.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import React from 'react';
import { ReactComponent as SparklesIcon } from './sparkles-icon.svg';

const IconWithConditionalStyle = ({ pressed }) => {
return (
<div>
<SparklesIcon pressed={pressed} />
</div>
);
};

export default IconWithConditionalStyle;
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ import { Paper } from "yoastseo";

/* Internal dependencies */
import { ModalContent } from "./modal-content";
import { SparklesIcon } from "./sparkles-icon";
// import { SparklesIcon } from "./sparkles-icon";
import SparklesIcon from "./sparkles-icon.svg";
//import IconWithConditionalStyle from './SparklesIcon';

/**
* The AI Assessment Fixes button component.
Expand Down Expand Up @@ -93,7 +95,13 @@ const AIAssessmentFixesButton = ( { id, isPremium } ) => {
className={ `ai-button ${buttonClass}` }
pressed={ isButtonPressed }
>
<SparklesIcon pressed={ isButtonPressed } />
{/* <SparklesIcon pressed={ isButtonPressed } /> */}
{/* <SparklesIcon pressed={isButtonPressed} /> */}
<div>
<SparklesIcon pressed = { isButtonPressed }
style={{ stroke: isButtonPressed ? "white": "url (#paint0_linear_1208_18" }}
/>
</div>
{
// We put the logic for the Upsell component in place.
// The Modal below is only a placeholder/mock. When we have the design for the real upsell, the modal should be replaced.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ export const SparklesIcon = ( { pressed = false } ) => {
id="paint0_linear_1208_188" x1="0" y1="0" x2="16" y2="16"
gradientUnits="userSpaceOnUse"
>
<stop stopColor="#A61E69" />
<stop offset="1" stopColor="#3B82F6" />
<stop offset="0%" stopColor="#A61E69" />
<stop offset="100%" stopColor="#3B82F6" />
</linearGradient>
</defs>
</svg>
Expand Down
22 changes: 22 additions & 0 deletions packages/js/src/ai-assessment-fixes/components/sparkles-icon.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.