fixed edit icon for event-type details (#1230)
This commit is contained in:
		
							parent
							
								
									98d3cb1915
								
							
						
					
					
						commit
						20cbab1c15
					
				
					 1 changed files with 20 additions and 13 deletions
				
			
		| 
						 | 
					@ -443,19 +443,26 @@ const EventTypePage = (props: inferSSRProps<typeof getServerSideProps>) => {
 | 
				
			||||||
        centered
 | 
					        centered
 | 
				
			||||||
        title={t("event_type_title", { eventTypeTitle: eventType.title })}
 | 
					        title={t("event_type_title", { eventTypeTitle: eventType.title })}
 | 
				
			||||||
        heading={
 | 
					        heading={
 | 
				
			||||||
          <div className="relative -mb-2 group" onClick={() => setEditIcon(false)}>
 | 
					          <div className="relative -mb-2 group cursor-pointer" onClick={() => setEditIcon(false)}>
 | 
				
			||||||
            <input
 | 
					            {editIcon ? (
 | 
				
			||||||
              type="text"
 | 
					              <>
 | 
				
			||||||
              required
 | 
					                <h1
 | 
				
			||||||
              className="w-full pl-0 text-xl font-bold text-gray-900 bg-transparent border-none cursor-pointer focus:text-black hover:text-gray-700 focus:ring-0 focus:outline-none"
 | 
					                  style={{ fontSize: 22, letterSpacing: "-0.0009em" }}
 | 
				
			||||||
              placeholder={t("quick_chat")}
 | 
					                  className="inline pl-0 text-gray-900 bg-transparent border-none cursor-pointer focus:text-black hover:text-gray-500 focus:ring-0 focus:outline-none">
 | 
				
			||||||
              {...formMethods.register("title")}
 | 
					                  {eventType.title}
 | 
				
			||||||
              defaultValue={eventType.title}
 | 
					                </h1>
 | 
				
			||||||
            />
 | 
					                <PencilIcon className="-mt-1 ml-1 inline w-4 h-4 text-gray-700 group-hover:text-gray-500" />
 | 
				
			||||||
            {editIcon && (
 | 
					              </>
 | 
				
			||||||
              <PencilIcon
 | 
					            ) : (
 | 
				
			||||||
                style={{ top: 14, left: `${eventType.title.length * 10 + 8}` }}
 | 
					              <input
 | 
				
			||||||
                className="absolute left-0 inline w-4 h-4 text-gray-500 group-hover:text-gray-700"
 | 
					                type="text"
 | 
				
			||||||
 | 
					                autoFocus
 | 
				
			||||||
 | 
					                style={{ top: -6, fontSize: 22 }}
 | 
				
			||||||
 | 
					                required
 | 
				
			||||||
 | 
					                className="w-full relative pl-0 h-10 text-gray-900 bg-transparent border-none cursor-pointer focus:text-black hover:text-gray-700 focus:ring-0 focus:outline-none"
 | 
				
			||||||
 | 
					                placeholder={t("quick_chat")}
 | 
				
			||||||
 | 
					                {...formMethods.register("title")}
 | 
				
			||||||
 | 
					                defaultValue={eventType.title}
 | 
				
			||||||
              />
 | 
					              />
 | 
				
			||||||
            )}
 | 
					            )}
 | 
				
			||||||
          </div>
 | 
					          </div>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue