Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/common/components/inviteUsers/modalFooter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,14 @@ export const PermissionSettingsFooter = () => {
const { t } = useTranslation();
const { addToast } = useToast();

const url = new URL(window.location.href);

return (
<FooterWithBorder>
<Button
isBasic
onClick={() => {
navigator.clipboard.writeText(window.location.href);
navigator.clipboard.writeText(`${url.origin}${url.pathname}`);
addToast(
({ close }) => (
<Notification
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import {
Ellipsis,
MD,
Progress,
Grid,
Expand All @@ -12,23 +11,20 @@ import { appTheme } from 'src/app/theme';
import styled from 'styled-components';
import { getPercentage, getSentiment } from '../utils';

// const ListItemTitle = styled.div`
// display: grid;
// grid-template-columns: 6fr 1fr;
// padding-top: ${({ theme }) => theme.space.xs};
// padding-bottom: ${({ theme }) => theme.space.xxs};
// align-items: bottom;
// `;

const ListItemWrapper = styled.div`
margin-top: ${(p) => p.theme.space.xxs};
display: block;
`;

const StyledSM = styled(SM)`
display: flex;
align-items: flex-end;
justify-content: flex-end;
align-items: center;

@media screen and (min-width: ${(p) => p.theme.breakpoints.xl}) {
align-items: flex-end;
justify-content: flex-end;
}

flex-shrink: 0;

svg {
Expand All @@ -52,18 +48,16 @@ export const Item = ({ item }: { item: Sentiment }) => {
<ListItemWrapper key={`cluster_${item.id}`}>
{/* <ListItemTitle> */}
<Grid>
<Row alignItems="end">
<Col xs={8} sm={9} md={10} style={{ margin: 0 }}>
<Row alignItemsXl="end">
<Col xs={12} xl={10} style={{ margin: 0 }}>
{/* <div > */}
<MD isBold style={{ color: appTheme.palette.blue[600] }}>
{item.title}
</MD>
<Ellipsis title={item.note} style={{ maxWidth: '97%' }}>
{item.note}
</Ellipsis>
<SM style={{ color: appTheme.palette.grey[600] }}>{item.note}</SM>
{/* </div> */}
</Col>
<Col xs={4} sm={3} md={2} style={{ margin: 0 }}>
<Col xs={12} xl={2} style={{ margin: 0 }}>
<StyledSM>{getSentiment(item.sentiment, t).text}</StyledSM>
</Col>
</Row>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,17 @@ const Description = styled(MD)`
margin: ${({ theme }) => theme.space.base * 5}px 0;
color: ${({ theme }) => theme.palette.grey[700]};
align-self: flex-start;
display: none;

@media (max-width: ${({ theme }) => theme.breakpoints.md}) {
display: none;
@media (min-width: ${({ theme }) => theme.breakpoints.xl}) {
display: block;
}
`;

const ListBody = styled.div`
margin-top: ${({ theme }) => theme.space.base * 4}px;
@media (min-width: ${({ theme }) => theme.breakpoints.xl}) {
margin-top: 0;
}
`;

Expand Down Expand Up @@ -67,20 +75,21 @@ export const SentimentList = ({
{t('__CAMPAIGN_EXP_WIDGET_SENTIMENT_LIST_DESCRIPTION')}
</Description>
<List>
<List.Columns style={{ marginBottom: 0 }}>
<List.Columns.Label isBold>
{' '}
{t('__CAMPAIGN_EXP_WIDGET_SENTIMENT_LIST_USECASE_LABEL', {
count: sentiments.length,
})}
</List.Columns.Label>
<List.Columns.Label isBold>
{t('__CAMPAIGN_EXP_WIDGET_SENTIMENT_LIST_SENTIMENT_LABEL')}
</List.Columns.Label>
</List.Columns>
{paginatedItems.map((item) => (
<Item item={item} />
))}
<ListBody>
<List.Columns style={{ marginBottom: 0 }}>
<List.Columns.Label isBold>
{t('__CAMPAIGN_EXP_WIDGET_SENTIMENT_LIST_USECASE_LABEL', {
count: sentiments.length,
})}
</List.Columns.Label>
<List.Columns.Label isBold>
{t('__CAMPAIGN_EXP_WIDGET_SENTIMENT_LIST_SENTIMENT_LABEL')}
</List.Columns.Label>
</List.Columns>
{paginatedItems.map((item) => (
<Item item={item} />
))}
</ListBody>
<List.Pagination
setPage={setCurrentPage}
page={currentPage}
Expand Down