UNPKG

jattac.react.recents

Version:

A React component and utility for tracking and displaying recent browser locations and URLs.

112 lines (97 loc) 1.91 kB
.recentsContainer { font-family: "Arial", sans-serif; padding: 1.5rem; border: 1px solid #e5e5e5; border-radius: 8px; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); background: #fff; max-width: 600px; margin: 0 auto; } .recentsTitle { font-size: 1.5rem; font-weight: bold; margin-bottom: 1rem; color: #333; display: flex; justify-content: space-between; align-items: center; } .removeAllButton { background-color: #e53935; color: #fff; border: none; padding: 0.5rem 1rem; border-radius: 4px; cursor: pointer; font-size: 0.9rem; transition: background-color 0.2s ease; } .removeAllButton:hover { background-color: #d32f2f; } .recentItem { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; opacity: 0; transform: translateY(10px); animation: fadeIn 0.3s ease forwards; } .recentItem:last-child { margin-bottom: 0; } .recentLink { text-decoration: none; color: #0073e6; font-size: 1rem; flex: 1; margin-right: 1rem; transition: color 0.2s ease; } .recentLink:hover { color: #005bb5; } .timeLabel { font-size: 0.9rem; color: #666; margin-right: 1rem; } .removeButton { background-color: transparent; color: #e53935; border: none; font-size: 1rem; cursor: pointer; padding: 0.2rem 0.5rem; transition: color 0.2s ease; } .removeButton:hover { color: #d32f2f; } .noRecents { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 2rem 1rem; text-align: center; } .noRecentsIcon { width: 48px; height: 48px; color: #ccc; margin-bottom: 1rem; } .noRecentsText { font-size: 1rem; color: #666; line-height: 1.5; } @keyframes fadeIn { to { opacity: 1; transform: translateY(0); } }