mirror of
https://github.com/grafana/grafana.git
synced 2025-07-29 17:12:29 +08:00
Migration: Save dashboard modals (#22395)
* Add mechanism for imperatively showing modals * Migration work in progress * Reorganise save modal components * use app events emmiter instead of root scope one * Add center alignment to layoout component * Make save buttons wotk * Prettier * Remove save dashboard logic from dashboard srv * Remove unused code * Dont show error notifications * Save modal when dashboard is overwritten * For tweaks * Folder picker tweaks * Save dashboard tweaks * Copy provisioned dashboard to clipboard * Enable saving dashboard json to file * Use SaveDashboardAsButton * Review * Align buttons in dashboard settings * Migrate SaveDashboardAs tests * TS fixes * SaveDashboardForm tests migrated * Fixe some failing tests * Fix folder picker tests * Fix HistoryListCtrl tests * Remove old import * Enable fixed positioning for folder picker select menu * Modal: show react modals with appEvents * Open react modals using event * Move save dashboard modals to dashboard feature * Make e2e pass * Update public/app/features/dashboard/components/SaveDashboard/SaveDashboardButton.tsx * Hacking old vs new buttons to make all the things look like it's old good Grafana ;) Co-authored-by: Alexander Zobnin <alexanderzobnin@gmail.com>
This commit is contained in:
@ -3,6 +3,7 @@ import { ThemeContext } from '../../themes';
|
||||
import { getButtonStyles } from './styles';
|
||||
import { ButtonContent } from './ButtonContent';
|
||||
import { ButtonSize, ButtonStyles, ButtonVariant } from './types';
|
||||
import { cx } from 'emotion';
|
||||
|
||||
type CommonProps = {
|
||||
size?: ButtonSize;
|
||||
@ -34,7 +35,7 @@ export const Button = React.forwardRef<HTMLButtonElement, ButtonProps>((props, r
|
||||
});
|
||||
|
||||
return (
|
||||
<button className={styles.button} {...buttonProps} ref={ref}>
|
||||
<button className={cx(styles.button, className)} {...buttonProps} ref={ref}>
|
||||
<ButtonContent icon={icon}>{children}</ButtonContent>
|
||||
</button>
|
||||
);
|
||||
@ -62,7 +63,7 @@ export const LinkButton = React.forwardRef<HTMLAnchorElement, LinkButtonProps>((
|
||||
});
|
||||
|
||||
return (
|
||||
<a className={styles.button} {...anchorProps} ref={ref}>
|
||||
<a className={cx(styles.button, className)} {...anchorProps} ref={ref}>
|
||||
<ButtonContent icon={icon}>{children}</ButtonContent>
|
||||
</a>
|
||||
);
|
||||
|
Reference in New Issue
Block a user