mirror of
https://github.com/immich-app/immich.git
synced 2026-04-11 11:42:02 -04:00
* refactor: form & form field * chore: remove unused components --------- Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com> Co-authored-by: Alex <alex.tran1502@gmail.com>
27 lines
643 B
Dart
27 lines
643 B
Dart
import 'package:flutter/material.dart';
|
|
import 'package:immich_ui/src/types.dart';
|
|
|
|
import 'icon_button.dart';
|
|
|
|
class ImmichCloseButton extends StatelessWidget {
|
|
final VoidCallback? onPressed;
|
|
final ImmichVariant variant;
|
|
final ImmichColor color;
|
|
|
|
const ImmichCloseButton({
|
|
super.key,
|
|
this.onPressed,
|
|
this.color = ImmichColor.primary,
|
|
this.variant = ImmichVariant.ghost,
|
|
});
|
|
|
|
@override
|
|
Widget build(BuildContext context) => ImmichIconButton(
|
|
key: key,
|
|
icon: Icons.close,
|
|
color: color,
|
|
variant: variant,
|
|
onPressed: onPressed ?? () => Navigator.of(context).pop(),
|
|
);
|
|
}
|