Skip to content

Commit

Permalink
small fixes (#30)
Browse files Browse the repository at this point in the history
* fix: rqr's onclick Element type should not be optional
* style(example): fixed incorrect config div height
  • Loading branch information
dylandbl authored Jul 20, 2022
1 parent 7d70487 commit d42ee32
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export const InputsContainer = styled.div<{ show: boolean }>`
${({ show }) =>
show
? css`
height: 150px;
height: 176px;
`
: css`
height: 0;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useState } from "react";
import QuickReactions from "react-quick-reactions";
import { PlacementType } from "../../../../../lib/esm/types";
import { commentEmojis } from "../../../utils/sampleData";
import { gridEmojis } from "../../../utils/sampleData";
import { Grid, GridItem, EmojiDisplay } from "./GridShowcaseStyles";

export const gridItems: { title: PlacementType | null; show: boolean }[] = [
Expand Down Expand Up @@ -140,18 +140,18 @@ export const GridShowcase = () => {

return (
<>
<h2>Try it out</h2>
<h2>Try it</h2>
<Grid>
{gridItemsArray.map((item, index) => {
return (
<QuickReactions
key={item?.title + index.toString()}
onClickReaction={(element) => {
setCurrentEmoji(element?.textContent);
setCurrentEmoji(element.textContent);
}}
isVisible={item.show}
onClose={() => handleVisibility(item.title, false)}
reactionsArray={commentEmojis}
reactionsArray={gridEmojis}
placement={item?.title ? item.title : undefined}
hideHeader
hideCloseButton
Expand Down
2 changes: 1 addition & 1 deletion src/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export interface RQRProps {
hideCloseButton?: boolean;
hideHeader?: boolean;
isVisible: boolean;
onClickReaction: (event?: Element) => void;
onClickReaction: (event: Element) => void;
onClose: () => void;
outerDivClassName?: string;
placement?: PlacementType;
Expand Down

0 comments on commit d42ee32

Please sign in to comment.