Skip to content

Commit

Permalink
Wrap icons with a forwardRef (#92)
Browse files Browse the repository at this point in the history
  • Loading branch information
sandhose authored Jul 17, 2024
1 parent 087c5d1 commit 87aae09
Show file tree
Hide file tree
Showing 512 changed files with 2,054 additions and 1,205 deletions.
6 changes: 4 additions & 2 deletions assets/web/icons/admin.cjs
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
var _reactJsxRuntime = require("react/jsx-runtime");
function AdminIcon(props) {
var React = require("react");
function AdminIcon(props, ref) {
return /*#__PURE__*/_reactJsxRuntime.jsx("svg", {
xmlns: "http://www.w3.org/2000/svg",
width: "1em",
height: "1em",
fill: "currentColor",
viewBox: "0 0 24 24",
ref: ref,
...props,
children: /*#__PURE__*/_reactJsxRuntime.jsx("path", {
fillRule: "evenodd",
Expand All @@ -16,4 +18,4 @@ function AdminIcon(props) {
}
;
AdminIcon.displayName = "AdminIcon";
module.exports = AdminIcon;
module.exports = React.forwardRef(AdminIcon);
7 changes: 4 additions & 3 deletions assets/web/icons/admin.d.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import * as React from "react";
import React from "react";

/**
* admin.svg
*/
declare const AdminIcon: React.FunctionComponent<
React.ComponentProps<"svg">
declare const AdminIcon: React.ForwardRefExoticComponent<
Omit<React.SVGProps<SVGSVGElement>, "ref" | "children"> &
React.RefAttributes<SVGSVGElement>
>;

export default AdminIcon;
6 changes: 4 additions & 2 deletions assets/web/icons/admin.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import { forwardRef } from "react";
import { jsx as _jsx } from "react/jsx-runtime";
function AdminIcon(props) {
function AdminIcon(props, ref) {
return /*#__PURE__*/_jsx("svg", {
xmlns: "http://www.w3.org/2000/svg",
width: "1em",
height: "1em",
fill: "currentColor",
viewBox: "0 0 24 24",
ref: ref,
...props,
children: /*#__PURE__*/_jsx("path", {
fillRule: "evenodd",
Expand All @@ -16,4 +18,4 @@ function AdminIcon(props) {
}
;
AdminIcon.displayName = "AdminIcon";
export default AdminIcon;
export default forwardRef(AdminIcon);
6 changes: 4 additions & 2 deletions assets/web/icons/arrow-down.cjs
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
var _reactJsxRuntime = require("react/jsx-runtime");
function ArrowDownIcon(props) {
var React = require("react");
function ArrowDownIcon(props, ref) {
return /*#__PURE__*/_reactJsxRuntime.jsx("svg", {
xmlns: "http://www.w3.org/2000/svg",
width: "1em",
height: "1em",
fill: "currentColor",
viewBox: "0 0 24 24",
ref: ref,
...props,
children: /*#__PURE__*/_reactJsxRuntime.jsx("path", {
d: "M12 4.5a1 1 0 0 1 1 1v10.586l4.293-4.293a1 1 0 0 1 1.414 1.414l-6 6a1 1 0 0 1-1.414 0l-6-6a1 1 0 1 1 1.414-1.414L11 16.086V5.5a1 1 0 0 1 1-1Z"
Expand All @@ -14,4 +16,4 @@ function ArrowDownIcon(props) {
}
;
ArrowDownIcon.displayName = "ArrowDownIcon";
module.exports = ArrowDownIcon;
module.exports = React.forwardRef(ArrowDownIcon);
7 changes: 4 additions & 3 deletions assets/web/icons/arrow-down.d.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import * as React from "react";
import React from "react";

/**
* arrow-down.svg
*/
declare const ArrowDownIcon: React.FunctionComponent<
React.ComponentProps<"svg">
declare const ArrowDownIcon: React.ForwardRefExoticComponent<
Omit<React.SVGProps<SVGSVGElement>, "ref" | "children"> &
React.RefAttributes<SVGSVGElement>
>;

export default ArrowDownIcon;
6 changes: 4 additions & 2 deletions assets/web/icons/arrow-down.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import { forwardRef } from "react";
import { jsx as _jsx } from "react/jsx-runtime";
function ArrowDownIcon(props) {
function ArrowDownIcon(props, ref) {
return /*#__PURE__*/_jsx("svg", {
xmlns: "http://www.w3.org/2000/svg",
width: "1em",
height: "1em",
fill: "currentColor",
viewBox: "0 0 24 24",
ref: ref,
...props,
children: /*#__PURE__*/_jsx("path", {
d: "M12 4.5a1 1 0 0 1 1 1v10.586l4.293-4.293a1 1 0 0 1 1.414 1.414l-6 6a1 1 0 0 1-1.414 0l-6-6a1 1 0 1 1 1.414-1.414L11 16.086V5.5a1 1 0 0 1 1-1Z"
Expand All @@ -14,4 +16,4 @@ function ArrowDownIcon(props) {
}
;
ArrowDownIcon.displayName = "ArrowDownIcon";
export default ArrowDownIcon;
export default forwardRef(ArrowDownIcon);
6 changes: 4 additions & 2 deletions assets/web/icons/arrow-left.cjs
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
var _reactJsxRuntime = require("react/jsx-runtime");
function ArrowLeftIcon(props) {
var React = require("react");
function ArrowLeftIcon(props, ref) {
return /*#__PURE__*/_reactJsxRuntime.jsx("svg", {
xmlns: "http://www.w3.org/2000/svg",
width: "1em",
height: "1em",
fill: "currentColor",
viewBox: "0 0 24 24",
ref: ref,
...props,
children: /*#__PURE__*/_reactJsxRuntime.jsx("path", {
d: "M12.207 5.293a1 1 0 0 1 0 1.414L7.914 11H18.5a1 1 0 1 1 0 2H7.914l4.293 4.293a1 1 0 0 1-1.414 1.414l-6-6a1 1 0 0 1 0-1.414l6-6a1 1 0 0 1 1.414 0Z"
Expand All @@ -14,4 +16,4 @@ function ArrowLeftIcon(props) {
}
;
ArrowLeftIcon.displayName = "ArrowLeftIcon";
module.exports = ArrowLeftIcon;
module.exports = React.forwardRef(ArrowLeftIcon);
7 changes: 4 additions & 3 deletions assets/web/icons/arrow-left.d.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import * as React from "react";
import React from "react";

/**
* arrow-left.svg
*/
declare const ArrowLeftIcon: React.FunctionComponent<
React.ComponentProps<"svg">
declare const ArrowLeftIcon: React.ForwardRefExoticComponent<
Omit<React.SVGProps<SVGSVGElement>, "ref" | "children"> &
React.RefAttributes<SVGSVGElement>
>;

export default ArrowLeftIcon;
6 changes: 4 additions & 2 deletions assets/web/icons/arrow-left.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import { forwardRef } from "react";
import { jsx as _jsx } from "react/jsx-runtime";
function ArrowLeftIcon(props) {
function ArrowLeftIcon(props, ref) {
return /*#__PURE__*/_jsx("svg", {
xmlns: "http://www.w3.org/2000/svg",
width: "1em",
height: "1em",
fill: "currentColor",
viewBox: "0 0 24 24",
ref: ref,
...props,
children: /*#__PURE__*/_jsx("path", {
d: "M12.207 5.293a1 1 0 0 1 0 1.414L7.914 11H18.5a1 1 0 1 1 0 2H7.914l4.293 4.293a1 1 0 0 1-1.414 1.414l-6-6a1 1 0 0 1 0-1.414l6-6a1 1 0 0 1 1.414 0Z"
Expand All @@ -14,4 +16,4 @@ function ArrowLeftIcon(props) {
}
;
ArrowLeftIcon.displayName = "ArrowLeftIcon";
export default ArrowLeftIcon;
export default forwardRef(ArrowLeftIcon);
6 changes: 4 additions & 2 deletions assets/web/icons/arrow-right.cjs
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
var _reactJsxRuntime = require("react/jsx-runtime");
function ArrowRightIcon(props) {
var React = require("react");
function ArrowRightIcon(props, ref) {
return /*#__PURE__*/_reactJsxRuntime.jsx("svg", {
xmlns: "http://www.w3.org/2000/svg",
width: "1em",
height: "1em",
fill: "currentColor",
viewBox: "0 0 24 24",
ref: ref,
...props,
children: /*#__PURE__*/_reactJsxRuntime.jsx("path", {
d: "M11.793 5.293a1 1 0 0 1 1.414 0l6 6a1 1 0 0 1 0 1.414l-6 6a1 1 0 0 1-1.414-1.414L16.086 13H5.5a1 1 0 1 1 0-2h10.586l-4.293-4.293a1 1 0 0 1 0-1.414Z"
Expand All @@ -14,4 +16,4 @@ function ArrowRightIcon(props) {
}
;
ArrowRightIcon.displayName = "ArrowRightIcon";
module.exports = ArrowRightIcon;
module.exports = React.forwardRef(ArrowRightIcon);
7 changes: 4 additions & 3 deletions assets/web/icons/arrow-right.d.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import * as React from "react";
import React from "react";

/**
* arrow-right.svg
*/
declare const ArrowRightIcon: React.FunctionComponent<
React.ComponentProps<"svg">
declare const ArrowRightIcon: React.ForwardRefExoticComponent<
Omit<React.SVGProps<SVGSVGElement>, "ref" | "children"> &
React.RefAttributes<SVGSVGElement>
>;

export default ArrowRightIcon;
6 changes: 4 additions & 2 deletions assets/web/icons/arrow-right.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import { forwardRef } from "react";
import { jsx as _jsx } from "react/jsx-runtime";
function ArrowRightIcon(props) {
function ArrowRightIcon(props, ref) {
return /*#__PURE__*/_jsx("svg", {
xmlns: "http://www.w3.org/2000/svg",
width: "1em",
height: "1em",
fill: "currentColor",
viewBox: "0 0 24 24",
ref: ref,
...props,
children: /*#__PURE__*/_jsx("path", {
d: "M11.793 5.293a1 1 0 0 1 1.414 0l6 6a1 1 0 0 1 0 1.414l-6 6a1 1 0 0 1-1.414-1.414L16.086 13H5.5a1 1 0 1 1 0-2h10.586l-4.293-4.293a1 1 0 0 1 0-1.414Z"
Expand All @@ -14,4 +16,4 @@ function ArrowRightIcon(props) {
}
;
ArrowRightIcon.displayName = "ArrowRightIcon";
export default ArrowRightIcon;
export default forwardRef(ArrowRightIcon);
6 changes: 4 additions & 2 deletions assets/web/icons/arrow-up-right.cjs
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
var _reactJsxRuntime = require("react/jsx-runtime");
function ArrowUpRightIcon(props) {
var React = require("react");
function ArrowUpRightIcon(props, ref) {
return /*#__PURE__*/_reactJsxRuntime.jsx("svg", {
xmlns: "http://www.w3.org/2000/svg",
width: "1em",
height: "1em",
fill: "currentColor",
viewBox: "0 0 24 24",
ref: ref,
...props,
children: /*#__PURE__*/_reactJsxRuntime.jsx("path", {
d: "M17.924 6.617a.996.996 0 0 1 .076.38V15a1 1 0 1 1-2 0V9.414l-8.293 8.293a1 1 0 0 1-1.414-1.414L14.586 8H9a1 1 0 0 1 0-2h8a.997.997 0 0 1 .924.617Z"
Expand All @@ -14,4 +16,4 @@ function ArrowUpRightIcon(props) {
}
;
ArrowUpRightIcon.displayName = "ArrowUpRightIcon";
module.exports = ArrowUpRightIcon;
module.exports = React.forwardRef(ArrowUpRightIcon);
7 changes: 4 additions & 3 deletions assets/web/icons/arrow-up-right.d.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import * as React from "react";
import React from "react";

/**
* arrow-up-right.svg
*/
declare const ArrowUpRightIcon: React.FunctionComponent<
React.ComponentProps<"svg">
declare const ArrowUpRightIcon: React.ForwardRefExoticComponent<
Omit<React.SVGProps<SVGSVGElement>, "ref" | "children"> &
React.RefAttributes<SVGSVGElement>
>;

export default ArrowUpRightIcon;
6 changes: 4 additions & 2 deletions assets/web/icons/arrow-up-right.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import { forwardRef } from "react";
import { jsx as _jsx } from "react/jsx-runtime";
function ArrowUpRightIcon(props) {
function ArrowUpRightIcon(props, ref) {
return /*#__PURE__*/_jsx("svg", {
xmlns: "http://www.w3.org/2000/svg",
width: "1em",
height: "1em",
fill: "currentColor",
viewBox: "0 0 24 24",
ref: ref,
...props,
children: /*#__PURE__*/_jsx("path", {
d: "M17.924 6.617a.996.996 0 0 1 .076.38V15a1 1 0 1 1-2 0V9.414l-8.293 8.293a1 1 0 0 1-1.414-1.414L14.586 8H9a1 1 0 0 1 0-2h8a.997.997 0 0 1 .924.617Z"
Expand All @@ -14,4 +16,4 @@ function ArrowUpRightIcon(props) {
}
;
ArrowUpRightIcon.displayName = "ArrowUpRightIcon";
export default ArrowUpRightIcon;
export default forwardRef(ArrowUpRightIcon);
6 changes: 4 additions & 2 deletions assets/web/icons/arrow-up.cjs
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
var _reactJsxRuntime = require("react/jsx-runtime");
function ArrowUpIcon(props) {
var React = require("react");
function ArrowUpIcon(props, ref) {
return /*#__PURE__*/_reactJsxRuntime.jsx("svg", {
xmlns: "http://www.w3.org/2000/svg",
width: "1em",
height: "1em",
fill: "currentColor",
viewBox: "0 0 24 24",
ref: ref,
...props,
children: /*#__PURE__*/_reactJsxRuntime.jsx("path", {
d: "M12 19.5a1 1 0 0 0 1-1V7.914l4.293 4.293a1 1 0 0 0 1.414-1.414l-6-6a1 1 0 0 0-1.414 0l-6 6a1 1 0 1 0 1.414 1.414L11 7.914V18.5a1 1 0 0 0 1 1Z"
Expand All @@ -14,4 +16,4 @@ function ArrowUpIcon(props) {
}
;
ArrowUpIcon.displayName = "ArrowUpIcon";
module.exports = ArrowUpIcon;
module.exports = React.forwardRef(ArrowUpIcon);
7 changes: 4 additions & 3 deletions assets/web/icons/arrow-up.d.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import * as React from "react";
import React from "react";

/**
* arrow-up.svg
*/
declare const ArrowUpIcon: React.FunctionComponent<
React.ComponentProps<"svg">
declare const ArrowUpIcon: React.ForwardRefExoticComponent<
Omit<React.SVGProps<SVGSVGElement>, "ref" | "children"> &
React.RefAttributes<SVGSVGElement>
>;

export default ArrowUpIcon;
6 changes: 4 additions & 2 deletions assets/web/icons/arrow-up.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import { forwardRef } from "react";
import { jsx as _jsx } from "react/jsx-runtime";
function ArrowUpIcon(props) {
function ArrowUpIcon(props, ref) {
return /*#__PURE__*/_jsx("svg", {
xmlns: "http://www.w3.org/2000/svg",
width: "1em",
height: "1em",
fill: "currentColor",
viewBox: "0 0 24 24",
ref: ref,
...props,
children: /*#__PURE__*/_jsx("path", {
d: "M12 19.5a1 1 0 0 0 1-1V7.914l4.293 4.293a1 1 0 0 0 1.414-1.414l-6-6a1 1 0 0 0-1.414 0l-6 6a1 1 0 1 0 1.414 1.414L11 7.914V18.5a1 1 0 0 0 1 1Z"
Expand All @@ -14,4 +16,4 @@ function ArrowUpIcon(props) {
}
;
ArrowUpIcon.displayName = "ArrowUpIcon";
export default ArrowUpIcon;
export default forwardRef(ArrowUpIcon);
6 changes: 4 additions & 2 deletions assets/web/icons/attachment.cjs
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
var _reactJsxRuntime = require("react/jsx-runtime");
function AttachmentIcon(props) {
var React = require("react");
function AttachmentIcon(props, ref) {
return /*#__PURE__*/_reactJsxRuntime.jsx("svg", {
xmlns: "http://www.w3.org/2000/svg",
width: "1em",
height: "1em",
fill: "currentColor",
viewBox: "0 0 24 24",
ref: ref,
...props,
children: /*#__PURE__*/_reactJsxRuntime.jsx("path", {
d: "M11.5 22c-1.533 0-2.833-.533-3.9-1.6C6.533 19.333 6 18.033 6 16.5V6c0-1.1.392-2.042 1.175-2.825C7.958 2.392 8.9 2 10 2s2.042.392 2.825 1.175C13.608 3.958 14 4.9 14 6v9.5c0 .7-.242 1.292-.725 1.775-.483.483-1.075.725-1.775.725s-1.292-.242-1.775-.725C9.242 16.792 9 16.2 9 15.5V6.75A.728.728 0 0 1 9.75 6a.729.729 0 0 1 .75.75v8.75c0 .283.096.52.287.712.192.192.43.288.713.288s.52-.096.713-.288a.968.968 0 0 0 .287-.712V6c0-.7-.242-1.292-.725-1.775C11.292 3.742 10.7 3.5 10 3.5s-1.292.242-1.775.725C7.742 4.708 7.5 5.3 7.5 6v10.5c0 1.1.392 2.042 1.175 2.825.783.783 1.725 1.175 2.825 1.175s2.042-.392 2.825-1.175c.783-.783 1.175-1.725 1.175-2.825V6.75a.728.728 0 0 1 .75-.75.728.728 0 0 1 .75.75v9.75c0 1.533-.533 2.833-1.6 3.9-1.067 1.067-2.367 1.6-3.9 1.6Z"
Expand All @@ -14,4 +16,4 @@ function AttachmentIcon(props) {
}
;
AttachmentIcon.displayName = "AttachmentIcon";
module.exports = AttachmentIcon;
module.exports = React.forwardRef(AttachmentIcon);
Loading

0 comments on commit 87aae09

Please sign in to comment.