Skip to content

Commit

Permalink
feat: add branch name
Browse files Browse the repository at this point in the history
  • Loading branch information
pd4d10 committed May 3, 2019
1 parent 1c404a4 commit f642232
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 0 deletions.
1 change: 1 addition & 0 deletions examples/gallery/lib/main.dart
Expand Up @@ -97,6 +97,7 @@ class _MyHomePageState extends State<MyHomePage> {
StateLabel(StateLabelStatus.issueOpened),
StateLabel(StateLabelStatus.issueClosed),
StateLabel(StateLabelStatus.pullMerged),
BranchName('a_new_feature_branch'),
Text(
'You have pushed the button this many times:',
),
Expand Down
1 change: 1 addition & 0 deletions lib/primer.dart
@@ -1,2 +1,3 @@
export 'src/label.dart';
export 'src/colors.dart';
export 'src/branch_name.dart';
23 changes: 23 additions & 0 deletions lib/src/branch_name.dart
@@ -0,0 +1,23 @@
import 'package:flutter/widgets.dart';
import 'colors.dart';

const branchBgColor = Color(0xffeaf5ff);

class BranchName extends StatelessWidget {
final String name;

BranchName(this.name);

@override
Widget build(BuildContext context) {
return Container(
padding: EdgeInsets.symmetric(vertical: 2, horizontal: 6),
decoration: BoxDecoration(
color: branchBgColor,
borderRadius: BorderRadius.all(Radius.circular(3)),
),
child: Text(name,
style: TextStyle(color: PrimerColors.blue500, fontSize: 12)),
);
}
}

0 comments on commit f642232

Please sign in to comment.