Make that damn button the most important thing you've seen in your life
This commit is contained in:
parent
670f3af31d
commit
2dfcd1f099
3 changed files with 19 additions and 6 deletions
|
@ -12,7 +12,7 @@ export default function AccessibilityBox() {
|
||||||
}
|
}
|
||||||
}, []);
|
}, []);
|
||||||
return (
|
return (
|
||||||
<Floaty top>
|
<Floaty top important>
|
||||||
<input
|
<input
|
||||||
id="accessibility"
|
id="accessibility"
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
|
|
|
@ -38,6 +38,17 @@
|
||||||
right: 64px;
|
right: 64px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.FloatyImportant {
|
||||||
|
display: inline-block;
|
||||||
|
z-index: 8 !important;
|
||||||
|
padding: 16px;
|
||||||
|
background-color: var(--backgroundColor);
|
||||||
|
min-width: 0;
|
||||||
|
max-width: none;
|
||||||
|
border: 1px solid var(--color);
|
||||||
|
/* width: 200px; */
|
||||||
|
}
|
||||||
|
|
||||||
@media only screen and (max-width: 875px) {
|
@media only screen and (max-width: 875px) {
|
||||||
.Floaty {
|
.Floaty {
|
||||||
position: static !important;
|
position: static !important;
|
||||||
|
|
|
@ -3,23 +3,25 @@ import styles from "./Floaty.module.css";
|
||||||
export default function Floaty({
|
export default function Floaty({
|
||||||
children,
|
children,
|
||||||
top = false,
|
top = false,
|
||||||
|
important = false,
|
||||||
start = false,
|
start = false,
|
||||||
keepFloat = false,
|
keepFloat = false,
|
||||||
sticky = false,
|
sticky = false,
|
||||||
}: {
|
}: {
|
||||||
children?: React.ReactNode;
|
children?: React.ReactNode;
|
||||||
top?: boolean;
|
top?: boolean;
|
||||||
|
important?: boolean;
|
||||||
start?: boolean;
|
start?: boolean;
|
||||||
keepFloat?: boolean;
|
keepFloat?: boolean;
|
||||||
sticky?: boolean;
|
sticky?: boolean;
|
||||||
}) {
|
}) {
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className={`${styles.Floaty} ${top ? styles.FloatyTop : ""} ${
|
className={`${styles.Floaty} ${important ? styles.FloatyImportant : ""} ${
|
||||||
start ? styles.FloatyStart : ""
|
top ? styles.FloatyTop : ""
|
||||||
} ${keepFloat ? styles.FloatyKeep : ""} ${
|
} ${start ? styles.FloatyStart : ""} ${
|
||||||
sticky ? styles.FloatySticky : ""
|
keepFloat ? styles.FloatyKeep : ""
|
||||||
} FL-collapse-on-a11y`}
|
} ${sticky ? styles.FloatySticky : ""} FL-collapse-on-a11y`}
|
||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue