feat(proj): init
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:please_pay_me/theme/theme.dart';
|
||||
import 'package:please_pay_me/ui/ui.dart';
|
||||
import 'package:please_pay_me_widgetbook/knobs/common_knobs.dart';
|
||||
import 'package:please_pay_me_widgetbook/support/preview.dart';
|
||||
import 'package:widgetbook/widgetbook.dart';
|
||||
|
||||
WidgetbookComponent progressComponent() {
|
||||
return WidgetbookComponent(
|
||||
name: 'Progress',
|
||||
useCases: [
|
||||
WidgetbookUseCase(
|
||||
name: 'Activity indicator',
|
||||
builder: (context) {
|
||||
return IosPreview.centered(
|
||||
child: AppSpinner(
|
||||
radius: knobDouble(context, label: 'Radius', initialValue: 14, min: 6, max: 28),
|
||||
color: knobTint(context),
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
WidgetbookUseCase(
|
||||
name: 'Progress bar',
|
||||
builder: (context) {
|
||||
return IosPreview(
|
||||
stretch: true,
|
||||
padding: const EdgeInsets.all(AppSpacing.s4),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
children: [
|
||||
AppProgressBar(
|
||||
value: knobDouble(context, label: 'Value', initialValue: 0.42),
|
||||
color: knobTint(context),
|
||||
height: knobDouble(context, label: 'Height', initialValue: 4, min: 2, max: 12),
|
||||
),
|
||||
const SizedBox(height: AppSpacing.s4),
|
||||
const AppProgressBar(value: 0.15, color: AppColors.systemRed),
|
||||
const SizedBox(height: AppSpacing.s4),
|
||||
const AppProgressBar(value: 1, color: AppColors.systemGreen),
|
||||
],
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user