-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3ffaac3
commit f2f1f39
Showing
3 changed files
with
82 additions
and
91 deletions.
There are no files selected for viewing
35 changes: 0 additions & 35 deletions
35
packages/deriv_widgetbook/lib/components/banner/banner_usecases.dart
This file was deleted.
Oops, something went wrong.
44 changes: 44 additions & 0 deletions
44
...deriv_widgetbook/lib/components/date_range_picker/date_range_picker_calender_usecase.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import 'package:deriv_ui/deriv_ui.dart'; | ||
import 'package:flutter/material.dart'; | ||
import 'package:widgetbook/widgetbook.dart'; | ||
import 'package:widgetbook_annotation/widgetbook_annotation.dart'; | ||
|
||
final globalKey = GlobalKey(); | ||
|
||
@UseCase( | ||
name: 'DateRangePicker calendar mode', | ||
type: DerivDateRangePicker, | ||
) | ||
Widget dateRangePickerUseCase(BuildContext context) { | ||
return DerivDateRangePicker( | ||
key: globalKey, | ||
mode: DateRangePickerMode.calendar, | ||
context: context, | ||
currentDate: DateTime.now(), | ||
minAllowedDate: DateTime(2021), | ||
maxAllowedDate: DateTime(2025, 12, 31), | ||
cancelText: 'Cancel', | ||
confirmText: 'Confirm', | ||
semanticLabelCalendar: 'Calendar', | ||
semanticLabelClose: 'Close', | ||
semanticLabelConfirm: 'Confirm', | ||
semanticLabelEditIcon: 'Edit', | ||
labelSelectedDateRange: 'Selected Date Range', | ||
toolTipCalendar: 'Calendar', | ||
toolTipConfirm: 'Confirm', | ||
toolTipClose: 'Close', | ||
toolTipEdit: 'Edit', | ||
fieldEndLabelText: 'Start', | ||
fieldStartLabelText: 'End', | ||
initialStartDate: context.knobs.dateTime( | ||
label: 'Start Date', | ||
initialValue: DateTime.now(), | ||
start: DateTime.now(), | ||
end: DateTime(2024, 12, 11)), | ||
initialEndDate: context.knobs.dateTime( | ||
label: 'End Date', | ||
initialValue: DateTime(2024, 12, 11), | ||
start: DateTime.now(), | ||
end: DateTime(2024, 12, 11)), | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters