TF-4002 Apply new design for folder creation modal on web
This commit is contained in:
@@ -7,12 +7,14 @@ class DefaultButtonArrowDownFieldWidget extends StatelessWidget {
|
||||
final String text;
|
||||
final String iconArrowDown;
|
||||
final VoidCallback onTap;
|
||||
final Widget? icon;
|
||||
|
||||
const DefaultButtonArrowDownFieldWidget({
|
||||
super.key,
|
||||
required this.text,
|
||||
required this.iconArrowDown,
|
||||
required this.onTap,
|
||||
this.icon,
|
||||
});
|
||||
|
||||
@override
|
||||
@@ -35,6 +37,7 @@ class DefaultButtonArrowDownFieldWidget extends StatelessWidget {
|
||||
padding: const EdgeInsetsDirectional.only(start: 12, end: 8),
|
||||
child: Row(
|
||||
children: [
|
||||
if (icon != null) icon!,
|
||||
Expanded(
|
||||
child: Text(
|
||||
text,
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
import 'package:core/presentation/extensions/color_extension.dart';
|
||||
import 'package:core/presentation/views/dialog/confirm_dialog_button.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class ModalListActionButtonWidget extends StatelessWidget {
|
||||
final String positiveLabel;
|
||||
final String negativeLabel;
|
||||
final VoidCallback onNegativeAction;
|
||||
final VoidCallback onPositiveAction;
|
||||
final EdgeInsetsGeometry? padding;
|
||||
|
||||
const ModalListActionButtonWidget({
|
||||
super.key,
|
||||
required this.positiveLabel,
|
||||
required this.negativeLabel,
|
||||
required this.onPositiveAction,
|
||||
required this.onNegativeAction,
|
||||
this.padding,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
Widget negativeButton = Container(
|
||||
constraints: const BoxConstraints(minWidth: 67),
|
||||
height: 48,
|
||||
child: ConfirmDialogButton(
|
||||
label: negativeLabel,
|
||||
onTapAction: onNegativeAction,
|
||||
),
|
||||
);
|
||||
|
||||
Widget positiveButton = Container(
|
||||
constraints: const BoxConstraints(minWidth: 153),
|
||||
height: 48,
|
||||
child: ConfirmDialogButton(
|
||||
label: positiveLabel,
|
||||
backgroundColor: AppColor.primaryMain,
|
||||
textColor: Colors.white,
|
||||
onTapAction: onPositiveAction,
|
||||
),
|
||||
);
|
||||
|
||||
Widget bodyWidget = Row(
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: [
|
||||
Flexible(child: negativeButton),
|
||||
const SizedBox(width: 8),
|
||||
Flexible(child: positiveButton),
|
||||
],
|
||||
);
|
||||
|
||||
if (padding != null) {
|
||||
return Padding(padding: padding!, child: bodyWidget);
|
||||
} else {
|
||||
return bodyWidget;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user