Ignore:
Timestamp:
12/12/24 17:06:06 (6 weeks ago)
Author:
stefan toskovski <stefantoska84@…>
Branches:
main
Children:
79a0317
Parents:
d565449
Message:

Pred finalna verzija

Location:
imaps-frontend/src/components/SaveMap
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified imaps-frontend/src/components/SaveMap/SaveMap.jsx

    rd565449 r0c6b92a  
    22import HttpService from '../../scripts/net/HttpService';
    33import styles from './SaveMap.module.css';
     4import triggerMapSave from "../../scripts/util/triggerMapSave.js";
    45
    56const SaveMap = ({submitHandler}) => {
     
    89    const handleSubmit = (event) => {
    910        event.preventDefault();
    10         submitHandler(name);
     11        // submitHandler();
     12        // const mapSaveEvent = new CustomEvent("mapsave",{});
     13        // window.dispatchEvent(mapSaveEvent)
     14        triggerMapSave();
    1115    };
    1216
     
    1519        <div className={styles.saveMapContainer}>
    1620            <form onSubmit={handleSubmit} className={styles.saveMapForm}>
    17                 <div>
    18                     <label htmlFor="name">Map Name: </label>
    19                     <input
    20                         type="text"
    21                         id="name"
    22                         value={name}
    23                         onChange={(e) => setName(e.target.value)}
    24                         placeholder="Enter map name"
    25                         required
    26                         className={styles.saveMapInput}
    27                     />
    28                 </div>
    2921                <div>
    3022                    <button type="submit" className={styles.saveMapButton}>Save Map</button>
  • TabularUnified imaps-frontend/src/components/SaveMap/SaveMap.module.css

    rd565449 r0c6b92a  
    2121
    2222.saveMapButton {
    23   background-color: #e67e22;
    24   color: white;
     23  width: 100%;
     24  height: 50px;
     25  background-color: #e67e22 !important;
     26  color: #ffffff !important;
    2527  border: none;
    26   border-radius: 5px;
     28  border-radius: 8px;
     29  font-size: 20px;
     30  font-weight: bold;
    2731  cursor: pointer;
    28   width: 8vw;
    29   height: 2vw;
    30   text-align: center;
     32  display: flex;
     33  justify-content: center;
     34  align-items: center;
     35  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
     36  transition: background-color 0.3s, transform 0.2s, box-shadow 0.3s;
     37  appearance: none;
     38  -webkit-appearance: none;
    3139}
    3240
    3341.saveMapButton:hover {
    34   background-color: #b35418;
     42  background-color: #d2691e !important;
     43  transform: scale(1.05);
     44  box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
     45}
     46
     47.saveMapButton:active {
     48  background-color: #b35418 !important;
    3549  transform: scale(0.98);
    3650  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
Note: See TracChangeset for help on using the changeset viewer.