Skip to content

Commit

Permalink
fix: Dialog & Button styles and variants
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillemGarciaDev committed Mar 1, 2024
1 parent 8a24a6e commit b6e15b2
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/config/config.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const config = createConfig({
},
},
actions: {
variant: "primary",
variant: "filled",
component: Button,
fullWidth: true,
},
Expand Down
2 changes: 1 addition & 1 deletion src/config/theme/theme.declarations.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ declare module "@peersyst/react-native-components" {
outlined: true;
text: true;
glass: true;
filled: false;
filled: true;
}
}

Expand Down
13 changes: 13 additions & 0 deletions src/module/common/component/input/MainButton/MainButton.styles.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import styled from "@peersyst/react-native-styled";
import { darken } from "@peersyst/react-utils";
import Button from "module/common/component/input/Button/Button";

export const MainButtonRoot = styled(Button)(({ theme }) => {
Expand All @@ -18,5 +19,17 @@ export const MainButtonRoot = styled(Button)(({ theme }) => {
},
},
},
pressed: {
primary: {
backgroundGradient: {
colors: [
darken(theme.palette.gradient.greenDarkGreen[0], 0.15),
darken(theme.palette.gradient.greenDarkGreen[1], 0.15),
],
start: { x: 0, y: 0 },
end: { x: 1, y: 1 },
},
},
},
};
});
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ const DeleteData = () => {
text: translate("delete"),
type: "destructive",
action: handleDelete,
variant: "filled",
},
],
})
Expand Down

0 comments on commit b6e15b2

Please sign in to comment.