Offers, tabelka z uslugami
This commit is contained in:
27
src/islands/Offers/OffersSwitches.jsx
Normal file
27
src/islands/Offers/OffersSwitches.jsx
Normal file
@@ -0,0 +1,27 @@
|
||||
import "../../styles/offers/offers-switches.css";
|
||||
|
||||
export default function OffersSwitches({ switches, selected, onSwitch }) {
|
||||
if (!switches.length) return null;
|
||||
|
||||
return (
|
||||
<div class="fuz-switches-wrapper">
|
||||
{switches.map((sw) => (
|
||||
<div class="fuz-switch-block">
|
||||
<div class="fuz-switch-group">
|
||||
{sw.opcje.map((op) => (
|
||||
<button
|
||||
type="button"
|
||||
class={`fuz-switch ${
|
||||
selected[sw.id] === op.id ? "active" : ""
|
||||
}`}
|
||||
onClick={() => onSwitch(sw.id, op.id)}
|
||||
>
|
||||
{op.nazwa}
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user