rolled back btn

This commit is contained in:
Ulysia 2024-10-14 09:09:28 +02:00
parent 0540dd89a0
commit 15ce70b404

View file

@ -3,10 +3,11 @@ import baseStyle from "./styles/footer.scss"
import { useEffect, useState } from "preact/hooks" import { useEffect, useState } from "preact/hooks"
// Import the JSON data // Import the JSON data
import buttonsData from "./buttons.json" import buttonsData from "../buttons.json"
// Define the component export default (() => {
const Btn8831: QuartzComponent = ({ displayClass, cfg }: QuartzComponentProps) => { // Define the component
const Btn8831: QuartzComponent = ({ displayClass, cfg }: QuartzComponentProps) => {
// Since the data is static, you can directly use buttonsData // Since the data is static, you can directly use buttonsData
const [buttons, setButtons] = useState(buttonsData) const [buttons, setButtons] = useState(buttonsData)
@ -26,17 +27,15 @@ const Btn8831: QuartzComponent = ({ displayClass, cfg }: QuartzComponentProps) =
))} ))}
</div> </div>
) )
} }
// Define custom styles // Define custom styles
const customStyle = ` const customStyle = `
.btn8831-container { .btn8831-container {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
max-width: 60%; max-width: 60%;
margin: 0 auto; margin: 0 auto;
opacity: 1;
justify-content: center;
} }
.btn8831-container a { .btn8831-container a {
margin: 5px; margin: 5px;
@ -45,10 +44,10 @@ const customStyle = `
width: 88px; width: 88px;
height: 31px; height: 31px;
} }
` `
// Combine base styles with custom styles // Combine base styles with custom styles
Btn8831.css = customStyle Btn8831.css = baseStyle + customStyle
return Btn8831
export default (() => Btn8831) satisfies QuartzComponentConstructor })() satisfies QuartzComponentConstructor