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

Fixed css issues and icon transition #14

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all 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
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"prop-types": "^15.8.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-share": "^4.4.1",
"vite-plugin-svgr": "^2.4.0"
},
"devDependencies": {
Expand Down
Empty file removed src/app/WonderApp/App.module.css
Empty file.
6 changes: 3 additions & 3 deletions src/app/WonderApp/Launcher.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@ export const Launcher: React.FC = () => {
onMouseUp={(e) => e.preventDefault()}
style={{
position: strategy,
left: x ?? 0,
top: y ?? 0,
left: x ?? '50%',
top: y ?? '50%',
zIndex: '2147483647',
color: 'white',
transition: 'all 0.2s ease-in-out',
transition: 'all 0.3s ease-in-out',
}}
>
<ShadowDom>
Expand Down
78 changes: 78 additions & 0 deletions src/app/WonderMenu/ShareLinks/ShareLinks.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
import React from 'react';
import { createStyles, Flex, Grid, Text } from '@mantine/core';
import {
FacebookIcon,
FacebookShareButton,
LinkedinIcon,
LinkedinShareButton,
RedditIcon,
RedditShareButton,
TelegramIcon,
TelegramShareButton,
TwitterIcon,
TwitterShareButton,
} from 'react-share';

const useStyles = createStyles(() => ({
shareButton: {
cursor: 'pointer',
'&:hover:not(:active)': {
opacity: 0.85,
},
},
container: {
border: '1px solid #EAE7FE',
padding: '0.5rem',
borderRadius: '12px',
},
}));

export const ShareLinks: React.FC = () => {
const { classes } = useStyles();
const shareUrl = 'http://github.com';
const title = 'GitHub';

return (
<Grid className={classes.container}>
<Text align="center" mb={'1rem'} weight={700} color={'#7A64F7'}>
Spread the word and share our app with your friends and family on social
media!
</Text>
<Flex w={'100%'} gap={'1rem'} justify={'center'}>
<FacebookShareButton
url={shareUrl}
quote={title}
className={classes.shareButton}
>
<FacebookIcon size={32} round />
</FacebookShareButton>
<TwitterShareButton
url={shareUrl}
title={title}
className={classes.shareButton}
>
<TwitterIcon size={32} round />
</TwitterShareButton>
<TelegramShareButton
url={shareUrl}
title={title}
className={classes.shareButton}
>
<TelegramIcon size={32} round />
</TelegramShareButton>
<LinkedinShareButton url={shareUrl} className={classes.shareButton}>
<LinkedinIcon size={32} round />
</LinkedinShareButton>
<RedditShareButton
url={shareUrl}
title={title}
windowWidth={660}
windowHeight={460}
className={classes.shareButton}
>
<RedditIcon size={32} round />
</RedditShareButton>
</Flex>
</Grid>
);
};
37 changes: 0 additions & 37 deletions src/app/index.css

This file was deleted.

1 change: 0 additions & 1 deletion src/app/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import React from 'react';
import ReactDOM from 'react-dom/client';
import { Launcher } from './WonderApp/Launcher';
import './index.css';

ReactDOM.createRoot(document.getElementById('root') as HTMLElement).render(
<React.StrictMode>
Expand Down
5 changes: 3 additions & 2 deletions src/menu/ExtensionMenu/index.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import React, { useState, useEffect } from 'react';
import { Image, Flex, Group, Switch, Text, Center, Paper } from '@mantine/core';
import { IconCheck, IconX } from '@tabler/icons-react';
import '../../app/index.css';
import menuLogo from './menu-logo.png';
import menuGif from './menu-gif.gif';
import { ShareLinks } from '../../app/WonderMenu/ShareLinks/ShareLinks';

export const WONDER_ACTIVE_STORAGE_KEY = 'wonder-active';

Expand All @@ -29,7 +29,7 @@ export const ExtensionMenu: React.FC = () => {
};

return (
<Paper py={40} px={15}>
<Paper miw={350} py={40} px={15}>
<Center maw={400} mx="auto">
<Flex
maw={500}
Expand Down Expand Up @@ -76,6 +76,7 @@ export const ExtensionMenu: React.FC = () => {
{/* <Text fz="sm" ta={'center'} color={'grey'}>
Share with us your feedback feedback@wonder.ai
</Text> */}
<ShareLinks />
</Flex>
</Center>
</Paper>
Expand Down
22 changes: 21 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -859,6 +859,11 @@ cheerio@^1.0.0-rc.10:
parse5 "^7.0.0"
parse5-htmlparser2-tree-adapter "^7.0.0"

classnames@^2.3.2:
version "2.3.2"
resolved "https://registry.yarnpkg.com/classnames/-/classnames-2.3.2.tgz#351d813bf0137fcc6a76a16b88208d2560a0d924"
integrity sha512-CSbhY4cFEJRe6/GQzIk5qXZ4Jeg5pcsP7b5peFSDpffpe1cqjASH/n9UTjBwOp6XpMSTwQ8Za2K5V02ueA7Tmw==

clsx@1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/clsx/-/clsx-1.1.1.tgz#98b3134f9abbdf23b2663491ace13c5c03a73188"
Expand Down Expand Up @@ -940,7 +945,7 @@ csstype@^3.0.2:
resolved "https://registry.yarnpkg.com/csstype/-/csstype-3.1.1.tgz#841b532c45c758ee546a11d5bd7b7b473c8c30b9"
integrity sha512-DJR/VvkAvSZW9bTouZue2sSxDwdTN92uHjqeKVm+0dAqdfNykRzQ95tay8aXMBAAPpUiq4Qcug2L7neoRh2Egw==

debug@^2.0.0:
debug@^2.0.0, debug@^2.1.3:
version "2.6.9"
resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f"
integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==
Expand Down Expand Up @@ -1344,6 +1349,13 @@ jsonfile@^6.0.1:
optionalDependencies:
graceful-fs "^4.1.6"

jsonp@^0.2.1:
version "0.2.1"
resolved "https://registry.yarnpkg.com/jsonp/-/jsonp-0.2.1.tgz#a65b4fa0f10bda719a05441ea7b94c55f3e15bae"
integrity sha512-pfog5gdDxPdV4eP7Kg87M8/bHgshlZ5pybl+yKxAnCZ5O7lCIn7Ixydj03wOlnDQesky2BPyA91SQ+5Y/mNwzw==
dependencies:
debug "^2.1.3"

lines-and-columns@^1.1.6:
version "1.2.4"
resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz#eca284f75d2965079309dc0ad9255abb2ebc1632"
Expand Down Expand Up @@ -1547,6 +1559,14 @@ react-refresh@^0.14.0:
resolved "https://registry.yarnpkg.com/react-refresh/-/react-refresh-0.14.0.tgz#4e02825378a5f227079554d4284889354e5f553e"
integrity sha512-wViHqhAd8OHeLS/IRMJjTSDHF3U9eWi62F/MledQGPdJGDhodXJ9PBLNGr6WWL7qlH12Mt3TyTpbS+hGXMjCzQ==

react-share@^4.4.1:
version "4.4.1"
resolved "https://registry.yarnpkg.com/react-share/-/react-share-4.4.1.tgz#4bfb0b512e26afedfea2fb66eb13c95c28fb216a"
integrity sha512-AJ9m9RiJssqvYg7MoJUc9J0D7b/liWrsfQ99ndKc5vJ4oVHHd4Fy87jBlKEQPibT40oYA3AQ/a9/oQY6/yaigw==
dependencies:
classnames "^2.3.2"
jsonp "^0.2.1"

react-textarea-autosize@8.3.4:
version "8.3.4"
resolved "https://registry.yarnpkg.com/react-textarea-autosize/-/react-textarea-autosize-8.3.4.tgz#270a343de7ad350534141b02c9cb78903e553524"
Expand Down