aboutsummaryrefslogtreecommitdiffstats
path: root/packages/excalidraw/components/InlineIcon.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'packages/excalidraw/components/InlineIcon.tsx')
-rw-r--r--packages/excalidraw/components/InlineIcon.tsx15
1 files changed, 15 insertions, 0 deletions
diff --git a/packages/excalidraw/components/InlineIcon.tsx b/packages/excalidraw/components/InlineIcon.tsx
new file mode 100644
index 0000000..75cc29d
--- /dev/null
+++ b/packages/excalidraw/components/InlineIcon.tsx
@@ -0,0 +1,15 @@
+export const InlineIcon = ({ icon }: { icon: React.ReactNode }) => {
+ return (
+ <span
+ style={{
+ width: "1em",
+ margin: "0 0.5ex 0 0.5ex",
+ display: "inline-block",
+ lineHeight: 0,
+ verticalAlign: "middle",
+ }}
+ >
+ {icon}
+ </span>
+ );
+};