Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent arrow conversion to emoji; fix alignment of ticket elements #277

Merged
Show file tree
Hide file tree
Changes from 2 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
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export const TieredPricing = ({ticket, event, form, ticketIndex}: TieredPricingP
{ticket?.prices?.map((price, index) => {
return (
<div key={index} className={'hi-price-tier-row'}>
<Group justify={'space-between'}>
<Group justify={'space-between'} wrap={'nowrap'}>
<div className={'hi-price-tier'}>
<div className={'hi-price-tier-label'}>{price.label}</div>
<div className={'hi-price-tier-price'}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import {PoweredByFooter} from "../../../common/PoweredByFooter";
import {Event} from "../../../../types.ts";
import {eventsClientPublic} from "../../../../api/event.client.ts";
import {promoCodeClientPublic} from "../../../../api/promo-code.client.ts";
import {IconX} from "@tabler/icons-react"
import {IconX, IconNavigationFilled} from "@tabler/icons-react"
import {getSessionIdentifier} from "../../../../utilites/sessionIdentifier.ts";
import {Constants} from "../../../../constants.ts";

Expand Down Expand Up @@ -297,7 +297,7 @@ const SelectTickets = (props: SelectTicketsProps) => {
.map((n) => n.toString());
quantityRange.unshift("0");

const [ticketIsCollapsed, {toggle: collapseTicket}] = useDisclosure(!ticket.start_collapsed);
const [ticketIsCollapsed, {toggle: collapseTicket}] = useDisclosure(ticket.start_collapsed);

return (
<div key={ticket.id} className={'hi-ticket-row'}>
Expand Down Expand Up @@ -328,15 +328,14 @@ const SelectTickets = (props: SelectTicketsProps) => {
{(!ticket.is_available && ticket.type === 'TIERED') && (
<TicketAvailabilityMessage ticket={ticket} event={event}/>
)}

<span className={'hi-ticket-collapse-arrow'}>
{ticketIsCollapsed ? '\u25BC' : '\u25B6'}
</span>
</div>
<span className={`hi-ticket-collapse-arrow`}>
<IconNavigationFilled className={ticketIsCollapsed ? "" : "open"} />
grablair marked this conversation as resolved.
Show resolved Hide resolved
</span>
</UnstyledButton>
</div>

<Collapse in={ticketIsCollapsed} className={'hi-ticket-content'}>
<Collapse in={!ticketIsCollapsed} className={'hi-ticket-content'}>
<div className={'hi-price-tiers-rows'}>
<TieredPricing
ticketIndex={ticketIndex}
Expand Down
21 changes: 16 additions & 5 deletions frontend/src/styles/widget/default.scss
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
align-items: center;

h3 {
flex: 1;
margin: 10px 0;

a {
Expand All @@ -48,14 +49,24 @@
}

.hi-ticket-title-metadata {
.hi-ticket-collapse-arrow {
color: var(--widget-secondary-color, var(--tk-primary));
margin-left: 10px;
}

margin-left: 5px;
font-weight: normal;
}

.hi-ticket-collapse-arrow {
display: flex;
color: var(--widget-secondary-color, var(--tk-primary));
margin-left: 10px;

svg {
transform: rotate(90deg);
transition: all 0.1s linear;
}

svg.open {
transform: rotate(180deg);
}
}
}
}

Expand Down
Loading