mirror of
https://github.com/getredash/redash.git
synced 2026-03-21 16:00:09 -04:00
Replace <a> and <button> with <PlainButton> (#5433)
* Add PlainButton * refactor close icons * reorder import * refactor remaining anchors * refactor: replace remaining <button> and TODOs * refactor: changed applicable elements to type link * fix: minor details * bug: fix tooltip ternary * refactor: improve interactivity and semantics of schema list item
This commit is contained in:
@@ -3,6 +3,7 @@ import PropTypes from "prop-types";
|
||||
import Dropdown from "antd/lib/dropdown";
|
||||
import Menu from "antd/lib/menu";
|
||||
import Button from "antd/lib/button";
|
||||
import PlainButton from "@/components/PlainButton";
|
||||
import { clientConfig } from "@/services/auth";
|
||||
|
||||
import PlusCircleFilledIcon from "@ant-design/icons/PlusCircleFilled";
|
||||
@@ -18,16 +19,18 @@ export default function QueryControlDropdown(props) {
|
||||
<Menu>
|
||||
{!props.query.isNew() && (!props.query.is_draft || !props.query.is_archived) && (
|
||||
<Menu.Item>
|
||||
<a target="_self" onClick={() => props.openAddToDashboardForm(props.selectedTab)}>
|
||||
<PlainButton onClick={() => props.openAddToDashboardForm(props.selectedTab)}>
|
||||
<PlusCircleFilledIcon /> Add to Dashboard
|
||||
</a>
|
||||
</PlainButton>
|
||||
</Menu.Item>
|
||||
)}
|
||||
{!clientConfig.disablePublicUrls && !props.query.isNew() && (
|
||||
<Menu.Item>
|
||||
<a onClick={() => props.showEmbedDialog(props.query, props.selectedTab)} data-test="ShowEmbedDialogButton">
|
||||
<PlainButton
|
||||
onClick={() => props.showEmbedDialog(props.query, props.selectedTab)}
|
||||
data-test="ShowEmbedDialogButton">
|
||||
<ShareAltOutlinedIcon /> Embed Elsewhere
|
||||
</a>
|
||||
</PlainButton>
|
||||
</Menu.Item>
|
||||
)}
|
||||
<Menu.Item>
|
||||
|
||||
Reference in New Issue
Block a user