mirror of
https://github.com/lemeow125/StudE-Frontend.git
synced 2025-08-03 01:53:18 +08:00
Unified styling for buttons
This commit is contained in:
parent
8fb8d6b8b2
commit
334978d2fd
7 changed files with 8 additions and 24 deletions
|
@ -1,21 +1,16 @@
|
|||
import * as React from "react";
|
||||
import { Pressable, GestureResponderEvent } from "react-native";
|
||||
import { Pressable } from "react-native";
|
||||
import styles from "../../styles";
|
||||
import { colors } from "../../styles";
|
||||
|
||||
export interface props {
|
||||
children: React.ReactNode;
|
||||
onPress: (event: GestureResponderEvent) => void;
|
||||
color: string;
|
||||
}
|
||||
|
||||
export default function DrawerButton(props: props) {
|
||||
export default function DrawerButton({ color = colors.secondary_3, ...props }) {
|
||||
return (
|
||||
<Pressable
|
||||
onPress={props.onPress}
|
||||
style={{
|
||||
...styles.button_template,
|
||||
...{
|
||||
backgroundColor: props.color,
|
||||
backgroundColor: color,
|
||||
width: "95%",
|
||||
justifyContent: "flex-start",
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue