mirror of
https://github.com/OpenCut-app/OpenCut.git
synced 2026-07-13 21:52:53 +02:00
refactor: standardize icon component props
This commit is contained in:
@@ -1,4 +1,6 @@
|
|||||||
export function OcVercelIcon({ className }: { className?: string }) {
|
import type { IconProps } from "./types";
|
||||||
|
|
||||||
|
export function OcVercelIcon({ className }: IconProps) {
|
||||||
return (
|
return (
|
||||||
<svg
|
<svg
|
||||||
className={className}
|
className={className}
|
||||||
@@ -17,10 +19,7 @@ export function OcVercelIcon({ className }: { className?: string }) {
|
|||||||
export function OcMarbleIcon({
|
export function OcMarbleIcon({
|
||||||
className = "",
|
className = "",
|
||||||
size = 32,
|
size = 32,
|
||||||
}: {
|
}: IconProps) {
|
||||||
className?: string;
|
|
||||||
size?: number;
|
|
||||||
}) {
|
|
||||||
return (
|
return (
|
||||||
<svg
|
<svg
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
@@ -43,10 +42,7 @@ export function OcMarbleIcon({
|
|||||||
export function OcDataBuddyIcon({
|
export function OcDataBuddyIcon({
|
||||||
className = "",
|
className = "",
|
||||||
size = 32,
|
size = 32,
|
||||||
}: {
|
}: IconProps) {
|
||||||
className?: string;
|
|
||||||
size?: number;
|
|
||||||
}) {
|
|
||||||
return (
|
return (
|
||||||
<svg
|
<svg
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
|||||||
@@ -0,0 +1,5 @@
|
|||||||
|
export interface IconProps {
|
||||||
|
size?: number;
|
||||||
|
className?: string;
|
||||||
|
strokeWidth?: number;
|
||||||
|
}
|
||||||
@@ -1,10 +1,9 @@
|
|||||||
|
import type { IconProps } from "./types";
|
||||||
|
|
||||||
export function OcVideoIcon({
|
export function OcVideoIcon({
|
||||||
className = "",
|
className = "",
|
||||||
size = 32,
|
size = 32,
|
||||||
}: {
|
}: IconProps) {
|
||||||
className?: string;
|
|
||||||
size?: number;
|
|
||||||
}) {
|
|
||||||
return (
|
return (
|
||||||
<svg
|
<svg
|
||||||
width={size}
|
width={size}
|
||||||
@@ -34,10 +33,7 @@ export function OcVideoIcon({
|
|||||||
export function OcCheckerboardIcon({
|
export function OcCheckerboardIcon({
|
||||||
className = "",
|
className = "",
|
||||||
size = 32,
|
size = 32,
|
||||||
}: {
|
}: IconProps) {
|
||||||
className?: string;
|
|
||||||
size?: number;
|
|
||||||
}) {
|
|
||||||
return (
|
return (
|
||||||
<svg
|
<svg
|
||||||
width={size}
|
width={size}
|
||||||
@@ -68,10 +64,7 @@ export function OcCheckerboardIcon({
|
|||||||
export function OcSlidersVerticalIcon({
|
export function OcSlidersVerticalIcon({
|
||||||
className = "",
|
className = "",
|
||||||
size = 32,
|
size = 32,
|
||||||
}: {
|
}: IconProps) {
|
||||||
className?: string;
|
|
||||||
size?: number;
|
|
||||||
}) {
|
|
||||||
return (
|
return (
|
||||||
<svg
|
<svg
|
||||||
width={size}
|
width={size}
|
||||||
@@ -113,10 +106,7 @@ export function OcSlidersVerticalIcon({
|
|||||||
export function OcSocialIcon({
|
export function OcSocialIcon({
|
||||||
className = "",
|
className = "",
|
||||||
size = 32,
|
size = 32,
|
||||||
}: {
|
}: IconProps) {
|
||||||
className?: string;
|
|
||||||
size?: number;
|
|
||||||
}) {
|
|
||||||
return (
|
return (
|
||||||
<svg
|
<svg
|
||||||
width={Math.round(size * (38 / 24))}
|
width={Math.round(size * (38 / 24))}
|
||||||
@@ -162,10 +152,7 @@ export function OcSocialIcon({
|
|||||||
export function OcTextWidthIcon({
|
export function OcTextWidthIcon({
|
||||||
className = "",
|
className = "",
|
||||||
size = 32,
|
size = 32,
|
||||||
}: {
|
}: IconProps) {
|
||||||
className?: string;
|
|
||||||
size?: number;
|
|
||||||
}) {
|
|
||||||
return (
|
return (
|
||||||
<svg
|
<svg
|
||||||
width={Math.round((size * 17) / 24)}
|
width={Math.round((size * 17) / 24)}
|
||||||
@@ -190,10 +177,7 @@ export function OcTextWidthIcon({
|
|||||||
export function OcTextHeightIcon({
|
export function OcTextHeightIcon({
|
||||||
className = "",
|
className = "",
|
||||||
size = 32,
|
size = 32,
|
||||||
}: {
|
}: IconProps) {
|
||||||
className?: string;
|
|
||||||
size?: number;
|
|
||||||
}) {
|
|
||||||
return (
|
return (
|
||||||
<svg
|
<svg
|
||||||
width={Math.round((size * 20) / 23)}
|
width={Math.round((size * 20) / 23)}
|
||||||
@@ -218,10 +202,7 @@ export function OcTextHeightIcon({
|
|||||||
export function OcFontIcon({
|
export function OcFontIcon({
|
||||||
className = "",
|
className = "",
|
||||||
size = 32,
|
size = 32,
|
||||||
}: {
|
}: IconProps) {
|
||||||
className?: string;
|
|
||||||
size?: number;
|
|
||||||
}) {
|
|
||||||
return (
|
return (
|
||||||
<svg
|
<svg
|
||||||
width={size}
|
width={size}
|
||||||
@@ -244,11 +225,7 @@ export function OcShapesIcon({
|
|||||||
className = "",
|
className = "",
|
||||||
size = 32,
|
size = 32,
|
||||||
strokeWidth = 1.5,
|
strokeWidth = 1.5,
|
||||||
}: {
|
}: IconProps) {
|
||||||
className?: string;
|
|
||||||
size?: number;
|
|
||||||
strokeWidth?: number;
|
|
||||||
}) {
|
|
||||||
return (
|
return (
|
||||||
<svg
|
<svg
|
||||||
width={size}
|
width={size}
|
||||||
@@ -288,10 +265,7 @@ export function OcShapesIcon({
|
|||||||
export function OcMirrorIcon({
|
export function OcMirrorIcon({
|
||||||
className = "",
|
className = "",
|
||||||
size = 32,
|
size = 32,
|
||||||
}: {
|
}: IconProps) {
|
||||||
className?: string;
|
|
||||||
size?: number;
|
|
||||||
}) {
|
|
||||||
return (
|
return (
|
||||||
<svg
|
<svg
|
||||||
width={size}
|
width={size}
|
||||||
@@ -329,11 +303,7 @@ export function OcSquarePlusIcon({
|
|||||||
className = "",
|
className = "",
|
||||||
size = 32,
|
size = 32,
|
||||||
strokeWidth = 1.5,
|
strokeWidth = 1.5,
|
||||||
}: {
|
}: IconProps) {
|
||||||
className?: string;
|
|
||||||
size?: number;
|
|
||||||
strokeWidth?: number;
|
|
||||||
}) {
|
|
||||||
return (
|
return (
|
||||||
<svg
|
<svg
|
||||||
width={size}
|
width={size}
|
||||||
@@ -383,3 +353,4 @@ export function OcSquarePlusIcon({
|
|||||||
</svg>
|
</svg>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user