Skip to content

Commit

Permalink
Pass props down to Tooltip components
Browse files Browse the repository at this point in the history
  • Loading branch information
kylesuss committed Jan 7, 2020
1 parent 7075c86 commit 99442cc
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions src/components/tooltip/TooltipLinkList.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,18 @@ const List = styled.ul`
list-style: none;
`;

export function TooltipLinkList({ links, LinkWrapper }) {
export function TooltipLinkList({ links, LinkWrapper, ...rest }) {
return (
<List>
{links.map(({ title, onClick, active, ...rest }, index) => (
<List {...rest}>
{links.map(({ title, onClick, active, ...linkRest }, index) => (
<ListItem
/* eslint-disable react/no-array-index-key */
key={index}
title={title}
onClick={onClick}
active={active}
LinkWrapper={LinkWrapper || null}
{...rest}
{...linkRest}
/>
))}
</List>
Expand Down
4 changes: 2 additions & 2 deletions src/components/tooltip/TooltipMessage.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ const MessageWrapper = styled.div`
box-sizing: border-box;
`;

export function TooltipMessage({ title, desc, links }) {
export function TooltipMessage({ title, desc, links, ...rest }) {
return (
<MessageWrapper>
<MessageWrapper {...rest}>
<Message>
{title && <Title>{title}</Title>}
{desc && <Desc>{desc}</Desc>}
Expand Down
4 changes: 2 additions & 2 deletions src/components/tooltip/TooltipNote.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ const Note = styled.div`
margin: 6px;
`;

export function TooltipNote({ note }) {
return <Note>{note}</Note>;
export function TooltipNote({ note, ...rest }) {
return <Note {...rest}>{note}</Note>;
}

TooltipNote.propTypes = {
Expand Down

0 comments on commit 99442cc

Please sign in to comment.