Skip to content

Commit

Permalink
build: fix build error
Browse files Browse the repository at this point in the history
  • Loading branch information
Anand Gorantala committed Oct 14, 2024
1 parent a390789 commit 04d5bbb
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
16 changes: 16 additions & 0 deletions examples/pixel/src/components/Price.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { formatPrice } from '@bloomreach/limitless-ui-react'

export function Price({ product, className }) {
const hasDiscount = product.price && product.sale_price && product.price !== product.sale_price;

if (!hasDiscount) {
return <p className={className}>{formatPrice(product.sale_price)}</p>;
}

return (
<p className={className}>
{product.price ? <span className="line-through mr-2 opacity-50">{formatPrice(product.price)}</span> : null}
<span className="text-rose-500">{formatPrice(product.sale_price)}</span>
</p>
);
}
2 changes: 1 addition & 1 deletion examples/pixel/src/components/SearchBar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ function SearchBarComponent() {
</div>
<input
className="border rounded w-full p-2 rounded pl-10 focus:outline-0"
placeholder="Search for chair, sofa, bed, pillow, pen, paper"
placeholder="Search for chair, sofa, bed, pillow, pen, plants, wall art"
ref={refs.setReference}
{...getReferenceProps({
onChange,
Expand Down

0 comments on commit 04d5bbb

Please sign in to comment.