-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'feature/redesign-explore-btn' into feature/design-veget…
…ation-data-box
- Loading branch information
Showing
7 changed files
with
161 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
import React from 'react'; | ||
import NewInfoIcon from '../icons/NewInfoIcon'; | ||
import { bindHover, bindPopover } from 'material-ui-popup-state'; | ||
import HoverPopover from 'material-ui-popup-state/HoverPopover'; | ||
import { usePopupState } from 'material-ui-popup-state/hooks'; | ||
|
||
interface Props { | ||
height: number; | ||
width: number; | ||
color: string; | ||
children: React.ReactNode; | ||
} | ||
|
||
const InfoIconPopup = ({ height, width, color, children }: Props) => { | ||
const abandonmentInfoPopupState = usePopupState({ | ||
variant: 'popover', | ||
popupId: 'abandonmentInfoPopover', | ||
}); | ||
return ( | ||
<div | ||
{...bindHover(abandonmentInfoPopupState)} | ||
style={{ cursor: 'pointer' }} | ||
> | ||
<NewInfoIcon height={height} width={width} color={color} /> | ||
<HoverPopover | ||
{...bindPopover(abandonmentInfoPopupState)} | ||
anchorOrigin={{ | ||
vertical: 'bottom', | ||
horizontal: 'center', | ||
}} | ||
transformOrigin={{ | ||
vertical: 'top', | ||
horizontal: 'left', | ||
}} | ||
onClick={(e) => { | ||
e.stopPropagation(); | ||
}} | ||
> | ||
{children} | ||
</HoverPopover> | ||
</div> | ||
); | ||
}; | ||
|
||
export default InfoIconPopup; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import React from 'react'; | ||
import { IconProps } from '../../features/common/types/common'; | ||
|
||
const RightArrowIcon = ({ width, color }: IconProps) => { | ||
return ( | ||
<svg | ||
xmlns="http://www.w3.org/2000/svg" | ||
width={width} | ||
viewBox="0 0 5 10" | ||
fill="none" | ||
> | ||
<path | ||
d="M2.68057 5.12199L0.240571 2.27199C-0.119429 1.85199 -0.0694288 1.22199 0.350571 0.861987C0.770571 0.501987 1.40057 0.551988 1.76057 0.971988L4.76057 4.47199C5.08057 4.84199 5.08057 5.40199 4.76057 5.77199L1.76057 9.27199C1.40057 9.69199 0.770572 9.74199 0.350572 9.38199C-0.0694285 9.02199 -0.119429 8.39199 0.240571 7.97199L2.68057 5.12199Z" | ||
fill={color} | ||
/> | ||
</svg> | ||
); | ||
}; | ||
|
||
export default RightArrowIcon; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import type { Meta, StoryObj } from '@storybook/react'; | ||
import InfoIconPopup from '../components/InfoIconPopup'; | ||
|
||
const meta: Meta<typeof InfoIconPopup> = { | ||
component: InfoIconPopup, | ||
}; | ||
|
||
export default meta; | ||
type Story = StoryObj<typeof InfoIconPopup>; | ||
|
||
export const TabsView: Story = { | ||
args: { | ||
height: 15, | ||
width: 15, | ||
color: '#BDBDBD', | ||
children: ( | ||
<> | ||
Lorem ipsum dolor sit amet consectetur, adipisicing elit. Optio, | ||
repellendus! | ||
</> | ||
), | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters