react-mention-input
Version:
A React component for input with @mention functionality.
180 lines (158 loc) • 3.14 kB
CSS
.message-card-container {
display: flex;
flex-direction: column;
gap: 16px; /* Space between cards */
font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
.message-card-wrapper {
display: flex;
flex-direction: column;
gap: 8px; /* Space between header and card */
}
.message-card {
display: flex;
flex-direction: column;
border: 1px solid #ccc;
border-radius: 8px;
padding: 16px;
background-color: #fff;
transition: box-shadow 0.2s;
margin-left: 36px; /* Indent to align with header content */
}
.message-card:hover {
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}
.message-card-header {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 0; /* No margin since header is outside */
}
.message-card-header-left {
display: flex;
align-items: center;
}
.message-card-item-name {
font-size: 14px;
color: #666;
font-weight: 500;
background-color: #f5f5f5;
padding: 4px 8px;
border-radius: 6px;
border: 1px solid #e0e0e0;
display: flex;
align-items: center;
white-space: nowrap;
}
.object-type-icon {
font-size: 14px;
display: inline-flex;
align-items: center;
}
.object-name-text {
font-weight: 600;
}
.revision-text {
font-weight: 400;
color: #888;
margin-left: 4px;
}
.message-card-img,
.message-card-initials {
width: 28px;
height: 28px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-size: 12px;
font-weight: bold;
color: #fff;
background-color: #007bff;
text-transform: uppercase;
margin-right: 8px;
}
.message-card-info {
display: flex;
align-items: center;
}
.message-card-name {
margin: 0;
font-size: 14px;
font-weight: 600;
line-height: 1.2;
margin-right: 8px;
}
.message-card-date {
margin: 0;
font-size: 12px;
color: #888888;
line-height: 1.2;
}
.message-card-body {
margin-top: 0; /* No margin since body is in the card */
}
.message-card-comment {
margin: 0;
font-size: 13px;
line-height: 1.5;
}
.mention-highlight {
background-color: #e0f7fa;
color: #007bff;
padding: 2px 4px;
border-radius: 4px;
}
.hashtag-highlight {
background-color: rgba(255, 165, 0, 0.15);
color: #FF8C00;
padding: 2px 4px;
border-radius: 4px;
font-weight: 500;
}
/* Tag chips styling */
.message-card-tags {
display: flex;
flex-wrap: wrap;
gap: 8px;
margin-top: 12px;
}
.tag-chip {
padding: 4px 8px;
border-radius: 4px;
font-size: 12px;
font-weight: 500;
border: none;
display: inline-block;
white-space: nowrap;
}
.hashtag-chip {
background-color: rgba(255, 165, 0, 0.15);
color: #FF8C00;
}
.mention-chip {
background-color: #E0F7FA;
color: #007BFF;
}
/* Related object styling */
.message-card-related {
display: flex;
align-items: center;
margin-top: 8px;
}
.related-label {
font-size: 13px;
color: #333;
margin-right: 8px;
}
.related-object-chip {
background-color: #f0f0f0;
color: #666;
padding: 2px 6px;
border-radius: 4px;
font-size: 12px;
height: 20px;
display: flex;
align-items: center;
border: 1px solid #ddd;
}