summaryrefslogtreecommitdiff
path: root/source/github-helpers/create-dropdown-item.tsx
diff options
context:
space:
mode:
authorGravatar Federico Brigante <me@fregante.com> 2022-06-06 23:59:52 +0800
committerGravatar GitHub <noreply@github.com> 2022-06-06 17:59:52 +0200
commit50c6fafc9692daa97daf894b5af5d4acb0caf7d8 (patch)
treecb541117f6d97b1af1a1ea00c92a947e338c98e2 /source/github-helpers/create-dropdown-item.tsx
parentfb994afa17888a0ce9029febdc9d7ae4ae94c8e4 (diff)
downloadrefined-github-50c6fafc9692daa97daf894b5af5d4acb0caf7d8.tar.gz
refined-github-50c6fafc9692daa97daf894b5af5d4acb0caf7d8.tar.zst
refined-github-50c6fafc9692daa97daf894b5af5d4acb0caf7d8.zip
Lint (#5654)
Co-authored-by: cheap-glitch <cheap.glitch@gmail.com>
Diffstat (limited to 'source/github-helpers/create-dropdown-item.tsx')
-rw-r--r--source/github-helpers/create-dropdown-item.tsx11
1 files changed, 11 insertions, 0 deletions
diff --git a/source/github-helpers/create-dropdown-item.tsx b/source/github-helpers/create-dropdown-item.tsx
new file mode 100644
index 00000000..1341607a
--- /dev/null
+++ b/source/github-helpers/create-dropdown-item.tsx
@@ -0,0 +1,11 @@
+import React from 'dom-chef';
+
+export default function createDropdownItem(label: string, url: string, attributes?: Record<string, string>): Element {
+ return (
+ <li {...attributes}>
+ <a role="menuitem" className="dropdown-item" href={url}>
+ {label}
+ </a>
+ </li>
+ );
+}