-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Widgetbook icons and reusable snippets (#35)
Co-authored-by: github-actions <[email protected]>
- Loading branch information
1 parent
085dc17
commit 0d23f7c
Showing
38 changed files
with
818 additions
and
807 deletions.
There are no files selected for viewing
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,47 @@ | ||
name: release-please | ||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
permissions: | ||
contents: write | ||
pull-requests: write | ||
|
||
jobs: | ||
release-please: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: google-github-actions/release-please-action@v4 | ||
with: | ||
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} | ||
code-quality: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 20 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} | ||
- name: Get branch name | ||
id: branch-name | ||
uses: tj-actions/[email protected] | ||
- uses: subosito/flutter-action@v2 | ||
- name: Setup flutter | ||
run: flutter pub get | ||
- name: Lint and format | ||
run: | | ||
dart format . -l 120 | ||
dart fix --apply | ||
flutter analyze | ||
cd example && flutter test | ||
- name: Check for modified files | ||
id: git-check | ||
run: echo "modified=$(if [ -n "$(git status --porcelain)" ]; then echo "true"; else echo "false"; fi)" >> $GITHUB_ENV | ||
- name: Update changes in GitHub repository | ||
if: env.modified == 'true' | ||
run: | | ||
git config --global user.name "github-actions" | ||
git config --global user.email "[email protected]" | ||
git add -A | ||
git commit -m '[automated commit] lint format and import sort' | ||
git push -f |
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
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 |
---|---|---|
|
@@ -59,9 +59,6 @@ jobs: | |
id: branch-name | ||
uses: tj-actions/[email protected] | ||
- uses: subosito/flutter-action@v2 | ||
with: | ||
flutter-version: "3.19.x" | ||
channel: "stable" | ||
- name: Setup flutter | ||
run: flutter pub get | ||
- name: Lint and format | ||
|
This file was deleted.
Oops, something went wrong.
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
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
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
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,76 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:zeta_example/widgets.dart'; | ||
import 'package:zeta_flutter/zeta_flutter.dart'; | ||
|
||
class RadiusExample extends StatelessWidget { | ||
static const String name = 'Radius'; | ||
|
||
const RadiusExample({super.key}); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
List<BorderRadius> radii = [ | ||
ZetaRadius.none, | ||
ZetaRadius.minimal, | ||
ZetaRadius.rounded, | ||
ZetaRadius.wide, | ||
ZetaRadius.full | ||
]; | ||
final colors = Zeta.of(context).colors; | ||
return ExampleScaffold( | ||
name: name, | ||
child: SingleChildScrollView( | ||
padding: EdgeInsets.all(ZetaSpacing.m), | ||
child: Row( | ||
mainAxisAlignment: MainAxisAlignment.center, | ||
children: [ | ||
Column( | ||
children: radii | ||
.map((rad) { | ||
return Container( | ||
width: 250, | ||
height: 100, | ||
decoration: BoxDecoration( | ||
borderRadius: rad, | ||
color: Zeta.of(context).colors.blue.shade30, | ||
border: Border.all(color: colors.blue.shade80, width: 3), | ||
), | ||
child: Center( | ||
child: Container( | ||
decoration: BoxDecoration( | ||
borderRadius: rad, | ||
color: Zeta.of(context).colors.surfacePrimary, | ||
border: Border.all(color: colors.blue.shade50, width: 3), | ||
), | ||
padding: EdgeInsets.all(ZetaSpacing.b), | ||
child: Text( | ||
rad.radiusString.split('.').last.capitalize(), | ||
style: ZetaTextStyles.titleMedium.apply( | ||
color: Zeta.of(context).colors.textDefault, | ||
fontStyle: FontStyle.normal, | ||
decoration: TextDecoration.none, | ||
), | ||
), | ||
), | ||
), | ||
); | ||
}) | ||
.divide(const SizedBox(height: ZetaSpacing.l)) | ||
.toList(), | ||
), | ||
], | ||
), | ||
), | ||
); | ||
} | ||
} | ||
|
||
extension on BorderRadius { | ||
String get radiusString { | ||
if (topLeft.x == 0) return 'ZetaRadius.none'; | ||
if (topLeft.x == 4) return 'ZetaRadius.minimal'; | ||
if (topLeft.x == 8) return 'ZetaRadius.rounded'; | ||
if (topLeft.x == 24) return 'ZetaRadius.wide'; | ||
return 'ZetaRadius.full'; | ||
} | ||
} |
Oops, something went wrong.