mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
fix: secondary button outline color (#4381)
* chore: restore the default outline color in SecondaryButton * chore: improve outline color for learn more button
This commit is contained in:
parent
f0bd50b246
commit
7e82a08b54
@ -20,6 +20,7 @@ class ThemeUploadLearnMoreButton extends StatelessWidget {
|
||||
height: ThemeUploadWidget.buttonSize.height,
|
||||
child: IntrinsicWidth(
|
||||
child: SecondaryButton(
|
||||
outlineColor: Theme.of(context).colorScheme.onBackground,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 8),
|
||||
child: FlowyText.medium(
|
||||
|
@ -37,21 +37,26 @@ class SecondaryTextButton extends StatelessWidget {
|
||||
this.label, {
|
||||
super.key,
|
||||
this.onPressed,
|
||||
this.textColor,
|
||||
this.outlineColor,
|
||||
this.mode = TextButtonMode.normal,
|
||||
});
|
||||
|
||||
final String label;
|
||||
final VoidCallback? onPressed;
|
||||
final TextButtonMode mode;
|
||||
final Color? textColor;
|
||||
final Color? outlineColor;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return SecondaryButton(
|
||||
mode: mode,
|
||||
onPressed: onPressed,
|
||||
outlineColor: outlineColor,
|
||||
child: FlowyText.regular(
|
||||
label,
|
||||
color: Theme.of(context).colorScheme.primary,
|
||||
color: textColor ?? Theme.of(context).colorScheme.primary,
|
||||
),
|
||||
);
|
||||
}
|
||||
@ -62,12 +67,14 @@ class SecondaryButton extends StatelessWidget {
|
||||
super.key,
|
||||
required this.child,
|
||||
this.onPressed,
|
||||
this.outlineColor,
|
||||
this.mode = TextButtonMode.normal,
|
||||
});
|
||||
|
||||
final Widget child;
|
||||
final VoidCallback? onPressed;
|
||||
final TextButtonMode mode;
|
||||
final Color? outlineColor;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@ -77,7 +84,7 @@ class SecondaryButton extends StatelessWidget {
|
||||
minHeight: size.height,
|
||||
contentPadding: EdgeInsets.zero,
|
||||
bgColor: Colors.transparent,
|
||||
outlineColor: Theme.of(context).colorScheme.onBackground,
|
||||
outlineColor: outlineColor ?? Theme.of(context).colorScheme.primary,
|
||||
borderRadius: mode.borderRadius,
|
||||
onPressed: onPressed,
|
||||
child: child,
|
||||
|
Loading…
Reference in New Issue
Block a user