Skip to content

Commit

Permalink
fix: icon not found
Browse files Browse the repository at this point in the history
  • Loading branch information
lekoOwO committed Oct 17, 2023
1 parent 5f883f9 commit aad8d2a
Showing 1 changed file with 30 additions and 6 deletions.
36 changes: 30 additions & 6 deletions src/plugins/moreStickers/components/icons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,34 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

import { LazyComponent } from "@utils/react";
import { findByCode } from "@webpack";
export function SearchIcon({ width, height, color }: { width: number, height: number, color: string; }) {
return (
<svg role="img" width={width} height={height} viewBox="0 0 24 24">
<path fill={color} d="M21.707 20.293L16.314 14.9C17.403 13.504 18 11.799 18 10C18 7.863 17.167 5.854 15.656 4.344C14.146 2.832 12.137 2 10 2C7.863 2 5.854 2.832 4.344 4.344C2.833 5.854 2 7.863 2 10C2 12.137 2.833 14.146 4.344 15.656C5.854 17.168 7.863 18 10 18C11.799 18 13.504 17.404 14.9 16.314L20.293 21.706L21.707 20.293ZM10 16C8.397 16 6.891 15.376 5.758 14.243C4.624 13.11 4 11.603 4 10C4 8.398 4.624 6.891 5.758 5.758C6.891 4.624 8.397 4 10 4C11.603 4 13.109 4.624 14.242 5.758C15.376 6.891 16 8.398 16 10C16 11.603 15.376 13.11 14.242 14.243C13.109 15.376 11.603 16 10 16Z"></path>
</svg>
);
};

export const SearchIcon = LazyComponent(() => findByCode("M21.707 20.293L16.314 14.9C17.403"));
export const CancelIcon = LazyComponent(() => findByCode("M18.4 4L12 10.4L5.6 4L4 5.6L10.4 12L4"));
export const RecentlyUsedIcon = LazyComponent(() => findByCode("M12 2C6.4764 2 2 6.4764 2 12C2 17.5236 6.4764 22 12 22C17.5236"));
export const CogIcon = LazyComponent(() => findByCode("M19.738 10H22V14H19.739C19.498 14.931 19.1"));
export function CancelIcon({ width, height, className, onClick }: { width: number, height: number, className: string, onClick: () => void; }) {
return (
<svg role="img" width={width} height={height} viewBox="0 0 24 24" className={className} onClick={onClick}>
<path fill="currentColor" d="M18.4 4L12 10.4L5.6 4L4 5.6L10.4 12L4 18.4L5.6 20L12 13.6L18.4 20L20 18.4L13.6 12L20 5.6L18.4 4Z"></path>
</svg>
);
};

export function RecentlyUsedIcon({ width, height, color }: { width: number, height: number, color: string; }) {
return (
<svg role="img" width={width} height={height} viewBox="0 0 24 24">
<path d="M12 2C6.4764 2 2 6.4764 2 12C2 17.5236 6.4764 22 12 22C17.5236 22 22 17.5236 22 12C22 6.4764 17.5236 2 12 2ZM12 5.6C12.4422 5.6 12.8 5.95781 12.8 6.4V11.5376L16.5625 13.7126C16.9453 13.9329 17.0703 14.4173 16.85 14.8001C16.6297 15.183 16.1453 15.3079 15.7625 15.0876L11.6873 12.7376C11.656 12.7251 11.6279 12.7048 11.5998 12.6876C11.3607 12.5486 11.1998 12.2954 11.1998 12.0001V6.4001C11.1998 5.9579 11.5578 5.6 12 5.6Z" fill={color}></path>
</svg>
);
};

export function CogIcon({ width, height }: { width: number, height: number; }) {
return (
<svg role="img" width={width} height={height} viewBox="0 0 24 24">
<path fill="currentColor" fill-rule="evenodd" clip-rule="evenodd" d="M19.738 10H22V14H19.739C19.498 14.931 19.1 15.798 18.565 16.564L20 18L18 20L16.565 18.564C15.797 19.099 14.932 19.498 14 19.738V22H10V19.738C9.069 19.498 8.203 19.099 7.436 18.564L6 20L4 18L5.436 16.564C4.901 15.799 4.502 14.932 4.262 14H2V10H4.262C4.502 9.068 4.9 8.202 5.436 7.436L4 6L6 4L7.436 5.436C8.202 4.9 9.068 4.502 10 4.262V2H14V4.261C14.932 4.502 15.797 4.9 16.565 5.435L18 3.999L20 5.999L18.564 7.436C19.099 8.202 19.498 9.069 19.738 10ZM12 16C14.2091 16 16 14.2091 16 12C16 9.79086 14.2091 8 12 8C9.79086 8 8 9.79086 8 12C8 14.2091 9.79086 16 12 16Z"></path>
</svg>
);
};

0 comments on commit aad8d2a

Please sign in to comment.