feat(proj): init
This commit is contained in:
@@ -0,0 +1,72 @@
|
||||
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 cardsComponent() {
|
||||
return WidgetbookComponent(
|
||||
name: 'AppCard',
|
||||
useCases: [
|
||||
WidgetbookUseCase(
|
||||
name: 'Playground',
|
||||
builder: (context) {
|
||||
final subtitle = knobText(context, label: 'Subtitle', initialValue: 'До 25 сентября');
|
||||
return IosPreview(
|
||||
stretch: true,
|
||||
child: AppCard(
|
||||
title: knobText(context, label: 'Title', initialValue: 'Бюджет'),
|
||||
subtitle: subtitle.isEmpty ? null : subtitle,
|
||||
onTap: knobBool(context, label: 'Tappable') ? () {} : null,
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
AppText.largeTitle(
|
||||
knobText(context, label: 'Amount', initialValue: '18 420 ₽'),
|
||||
),
|
||||
const SizedBox(height: AppSpacing.s4),
|
||||
AppProgressBar(
|
||||
value: knobDouble(context, label: 'Progress', initialValue: 0.42),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
WidgetbookUseCase(
|
||||
name: 'Metrics row',
|
||||
builder: (context) {
|
||||
return const IosPreview(
|
||||
stretch: true,
|
||||
child: AppCard(
|
||||
child: Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
AppText.footnote('Доход'),
|
||||
AppText.title('64 000 ₽'),
|
||||
],
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
AppText.footnote('Расход'),
|
||||
AppText.title('45 580 ₽', color: AppColors.systemRed),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user