changed btns?

This commit is contained in:
Ulysia 2024-10-14 09:08:15 +02:00
parent 045d3424ff
commit 0540dd89a0

View file

@ -5,9 +5,8 @@ import { useEffect, useState } from "preact/hooks"
// Import the JSON data // Import the JSON data
import buttonsData from "./buttons.json" import buttonsData from "./buttons.json"
export default (() => { // Define the component
// Define the component const Btn8831: QuartzComponent = ({ displayClass, cfg }: QuartzComponentProps) => {
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)
@ -27,10 +26,10 @@ export default (() => {
))} ))}
</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;
@ -46,10 +45,10 @@ export default (() => {
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 = customStyle
return Btn8831
})() satisfies QuartzComponentConstructor export default (() => Btn8831) satisfies QuartzComponentConstructor