Skip to content

Commit

Permalink
Make the buttons contained in the new FooterWithButtons full width …
Browse files Browse the repository at this point in the history
…by default (#84)
  • Loading branch information
dmnplb authored Sep 26, 2023
1 parent 12e6f1f commit 153cfde
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 0 additions & 2 deletions example/src/pages/FooterWithButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ export const FooterWithButton = () => (
primary={{
type: "Solid",
buttonProps: {
fullWidth: true,
color: "primary",
accessibilityLabel: "primary button",
onPress: constVoid,
Expand All @@ -35,7 +34,6 @@ export const FooterWithButton = () => (
type: "Outline",
buttonProps: {
color: "primary",
fullWidth: true,
accessibilityLabel: "secondary button",
onPress: constVoid,
label: "Secondary button"
Expand Down
6 changes: 3 additions & 3 deletions src/components/layout/BlockButtons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ type CommonProps = Readonly<{

export type BlockButtonProps = {
type: "Solid" | "Outline";
buttonProps: ButtonSolidProps;
buttonProps: Omit<ButtonSolidProps, "fullWidth">;
};

/**
Expand Down Expand Up @@ -125,9 +125,9 @@ export const BlockButtons = (props: Props) => {
) => (
<View style={style}>
{props.type === "Solid" ? (
<ButtonSolid {...props.buttonProps} />
<ButtonSolid fullWidth {...props.buttonProps} />
) : (
<ButtonOutline {...props.buttonProps} />
<ButtonOutline fullWidth {...props.buttonProps} />
)}
</View>
);
Expand Down

0 comments on commit 153cfde

Please sign in to comment.