Reduce drawer button width

This commit is contained in:
Keannu Bernasol 2023-12-18 15:59:29 +08:00
parent ab2525ad95
commit ad83423fc2

View file

@ -10,7 +10,6 @@ export interface props {
export default function DrawerButton(props: props) { export default function DrawerButton(props: props) {
const [clicked, setClicked] = useState(false); const [clicked, setClicked] = useState(false);
return ( return (
<div>
<button <button
onClick={props.onClick} onClick={props.onClick}
onMouseDown={() => { onMouseDown={() => {
@ -22,14 +21,13 @@ export default function DrawerButton(props: props) {
onMouseLeave={() => setClicked(false)} onMouseLeave={() => setClicked(false)}
style={{ style={{
borderRadius: 24, borderRadius: 24,
minWidth: "192px", minWidth: "160px",
maxWidth: "192px", maxWidth: "160px",
borderColor: colors.button_border, borderColor: colors.button_border,
borderStyle: "solid", borderStyle: "solid",
borderWidth: "2px", borderWidth: "2px",
paddingBottom: 0, paddingBottom: 0,
paddingTop: 0, paddingTop: 0,
paddingRight: "4px",
paddingLeft: "4px", paddingLeft: "4px",
marginBottom: "4px", marginBottom: "4px",
marginTop: "4px", marginTop: "4px",
@ -40,12 +38,11 @@ export default function DrawerButton(props: props) {
style={{ style={{
...(clicked ? styles.text_light : styles.text_dark), ...(clicked ? styles.text_light : styles.text_dark),
...styles.text_M, ...styles.text_M,
...{ textAlign: "left", marginLeft: "4px" }, ...{ textAlign: "left", marginLeft: "16px" },
}} }}
> >
{props.label} {props.label}
</p> </p>
</button> </button>
</div>
); );
} }