mirror of
https://github.com/flarum/core.git
synced 2025-08-08 01:16:52 +02:00
chore: extract FormModal
from Modal
(#3922)
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import app from 'flarum/admin/app';
|
||||
import ItemList from 'flarum/common/utils/ItemList';
|
||||
import generateElementId from 'flarum/admin/utils/generateElementId';
|
||||
import Modal, { IInternalModalAttrs } from 'flarum/common/components/Modal';
|
||||
import FormModal, { IFormModalAttrs } from 'flarum/common/components/FormModal';
|
||||
|
||||
import Mithril from 'mithril';
|
||||
import Button from 'flarum/common/components/Button';
|
||||
@@ -22,7 +22,7 @@ export interface IDateSelection {
|
||||
end: number;
|
||||
}
|
||||
|
||||
export interface IStatisticsWidgetDateSelectionModalAttrs extends IInternalModalAttrs {
|
||||
export interface IStatisticsWidgetDateSelectionModalAttrs extends IFormModalAttrs {
|
||||
onModalSubmit: (dates: IDateSelection) => void;
|
||||
value?: IDateSelection;
|
||||
}
|
||||
@@ -38,7 +38,7 @@ interface IStatisticsWidgetDateSelectionModalState {
|
||||
};
|
||||
}
|
||||
|
||||
export default class StatisticsWidgetDateSelectionModal extends Modal<IStatisticsWidgetDateSelectionModalAttrs> {
|
||||
export default class StatisticsWidgetDateSelectionModal extends FormModal<IStatisticsWidgetDateSelectionModalAttrs> {
|
||||
/* @ts-expect-error core typings don't allow us to set the type of the state attr :( */
|
||||
state: IStatisticsWidgetDateSelectionModalState = {
|
||||
inputs: {
|
||||
|
Reference in New Issue
Block a user