added <InfoBadge> component with tooltip (#1609)
* added <InfoBadge> component with tooltip, added to event-types event name * added title to <InfoBadge> for a12y
This commit is contained in:
1 parent
d7bd1e9957
commit
1bf4913051
4 files changed
+19
-2
No files matched your search
@@ -0,0 +1,15 @@
|
||||
import { InformationCircleIcon } from "@heroicons/react/solid";
|
||||
|
||||
import { Tooltip } from "@components/Tooltip";
|
||||
|
||||
export default function InfoBadge({ content }: { content: string }) {
|
||||
return (
|
||||
<>
|
||||
<Tooltip content={content}>
|
||||
<span title={content}>
|
||||
<InformationCircleIcon className="relative w-4 h-4 mt-px text-gray-500 top-px left-1 right-1" />
|
||||
</span>
|
||||
</Tooltip>
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
import React, { forwardRef, InputHTMLAttributes } from "react";
|
||||
|
||||
type Props = InputHTMLAttributes<HTMLInputElement> & {
|
||||
label: string;
|
||||
label: React.ReactNode;
|
||||
description: string;
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user