Skip to content

Commit

Permalink
💄 :: hashtag 버튼 컴포넌트 구축
Browse files Browse the repository at this point in the history
  • Loading branch information
iloveuhyeon committed Jul 8, 2024
1 parent a6b2549 commit 0e40806
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions lib/components/hashtag.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import 'package:flutter/material.dart';
import 'package:grapper/utils/grapper_color.dart';
import 'package:grapper/utils/grapper_font.dart';

class GrapperHashtag extends StatelessWidget {
const GrapperHashtag({
super.key,
required this.text,
this.isSelected = false,
});
final String text;
final bool isSelected;

@override
Widget build(BuildContext context) {
return Container(
height: 30,
alignment: Alignment.center,
padding: isSelected
? const EdgeInsets.symmetric(horizontal: 20)
: const EdgeInsets.all(0),
decoration: BoxDecoration(
color: isSelected ? GrapperColorRed.normal : Colors.black,
borderRadius: const BorderRadius.all(
Radius.circular(20),
),
),
child: GrapperText(
text: '#$text',
grapperFont: GrapperFonts.pretendard_500,
size: 17,
color: Colors.white,
),
);
}
}

0 comments on commit 0e40806

Please sign in to comment.