Skip to content

Commit

Permalink
fix: label expanded
Browse files Browse the repository at this point in the history
  • Loading branch information
pd4d10 committed Sep 19, 2019
1 parent dde16ec commit b094f11
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion primer/lib/src/label.dart
Expand Up @@ -93,7 +93,7 @@ class StateLabel extends StatelessWidget {
borderRadius: BorderRadius.all(Radius.circular(4)),
),
padding: EdgeInsets.all(6),
child: Row(
child: Wrap(
children: <Widget>[
Icon(iconData, color: PrimerColors.white, size: 15),
SizedBox(width: 2),
Expand Down
17 changes: 10 additions & 7 deletions primer_gallery/lib/screens/label.dart
Expand Up @@ -4,12 +4,15 @@ import 'package:primer/primer.dart';
class LabelScreen extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Column(children: <Widget>[
Label('default label', theme: PrimerTheme.primary),
Label('default label', theme: PrimerTheme.primary, outline: true),
StateLabel(StateLabelStatus.issueOpened),
StateLabel(StateLabelStatus.issueClosed),
StateLabel(StateLabelStatus.pullMerged),
]);
return Wrap(
spacing: 4,
children: <Widget>[
Label('default label', theme: PrimerTheme.primary),
Label('default label', theme: PrimerTheme.primary, outline: true),
StateLabel(StateLabelStatus.issueOpened),
StateLabel(StateLabelStatus.issueClosed),
StateLabel(StateLabelStatus.pullMerged),
],
);
}
}

0 comments on commit b094f11

Please sign in to comment.