Skip to content

Commit

Permalink
small padding adjustment in shader page
Browse files Browse the repository at this point in the history
  • Loading branch information
cxreiff committed Mar 3, 2024
1 parent 73e9fb4 commit 9eb6304
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
6 changes: 4 additions & 2 deletions src/common/toggle/toggle.component.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
import { ReactNode, Dispatch, SetStateAction } from "react";
import cn from "classnames";

import styles from "./toggle.module.scss";

type ToggleProps = {
value: boolean;
setter: Dispatch<SetStateAction<boolean>>;
children: ReactNode;
className?: string;
};

export const Toggle = ({ value, setter, children }: ToggleProps) => (
<label className={styles.toggle}>
export const Toggle = ({ value, setter, children, className }: ToggleProps) => (
<label className={cn(styles.toggle, className)}>
<span>{children}</span>
<input
type={"checkbox"}
Expand Down
7 changes: 6 additions & 1 deletion src/features/shaders/shaders.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,12 @@ const Shaders = () => {
label: nav_category,
}))}
options={[
<Toggle key={"show_code"} value={codeVisible} setter={setCodeVisible}>
<Toggle
key={"show_code"}
className={styles.toggle}
value={codeVisible}
setter={setCodeVisible}
>
show code
</Toggle>,
]}
Expand Down
4 changes: 4 additions & 0 deletions src/features/shaders/shaders.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,7 @@
}
}
}

.toggle {
padding: 0 0.75rem !important;
}

0 comments on commit 9eb6304

Please sign in to comment.