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

feat: nft view page cta module and responsive style updates #55

Open
wants to merge 25 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
78acf6b
feat: initial changes for image and containers
domw30 Nov 11, 2022
f5fbb43
refactor: add todo's for follow up task
domw30 Nov 16, 2022
b5bdf1b
refactor: rename components to align with figma designs
domw30 Nov 21, 2022
94754c2
refactor: set max-height of image
domw30 Nov 21, 2022
568f0be
refactor: improve page layouts
domw30 Nov 22, 2022
f2e0589
feat: implement prominent colour picking tool
domw30 Nov 22, 2022
4e115d0
feat: add media queries for image alignments
domw30 Nov 23, 2022
99ead9c
feat: WIP - nft page mobile and responsive styling updates
domw30 Nov 25, 2022
a05dfe9
feat: nft view page responsive style updates (tablet)
domw30 Nov 25, 2022
2e41616
feat: hide options for mobile
domw30 Nov 25, 2022
a31781e
feat: add text variant for place bid button and add to nft view page
domw30 Nov 25, 2022
3ee6c47
Merge branch 'main' into feat/nft-cta-module
domw30 Nov 28, 2022
e7f0f1e
Merge branch 'main' into feat/nft-cta-module
domw30 Nov 30, 2022
d1e5db2
fix: resolve build error caused by merge conflict
domw30 Nov 30, 2022
e592883
refactor: re-build actions and cta container module
domw30 Dec 2, 2022
4dab11e
refactor: update copy
domw30 Dec 5, 2022
880bf73
feat: WIP - add cta actions in line with figma designs
domw30 Dec 5, 2022
ab357f9
feat: set buy now button
domw30 Dec 5, 2022
6256d2c
refactor: clean up action imports
domw30 Dec 5, 2022
b2cdaf8
Merge branch 'main' into feat/nft-cta-module
domw30 Dec 6, 2022
490931b
refactor: tidy up variations logic and styling
domw30 Dec 6, 2022
88230ee
feat: add user cancel offer action variations
domw30 Dec 6, 2022
55b2ada
refactor: amend column to row
domw30 Dec 6, 2022
6739f93
refactor: rename components
domw30 Dec 13, 2022
0089d3b
refactor: rename useActionsData -> useActions
domw30 Dec 13, 2022
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 src/App.module.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.Container {
margin: 0 1rem;
overflow-x: hidden;
}
11 changes: 9 additions & 2 deletions src/features/buy-now/BuyNowButton.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
import { FC } from 'react';
import { FC, ReactNode } from 'react';

import { BuyNowModal } from './BuyNowModal';

export const BuyNowButton: FC = () => <BuyNowModal trigger={'Buy'} />;
type BuyNowButtonProps = {
zna: string;
trigger: ReactNode;
};

export const BuyNowButton: FC<BuyNowButtonProps> = ({ zna, trigger }) => (
<BuyNowModal trigger={trigger} />
);
Original file line number Diff line number Diff line change
@@ -1,19 +1,11 @@
@import '../../../../node_modules/@zero-tech/zui/styles/_colors.scss';

.Container {
display: flex;
align-items: center;
gap: 0.35rem;
.TextButton {
domw30 marked this conversation as resolved.
Show resolved Hide resolved
display: contents;
color: $blue;
line-height: 1.5rem;
padding: 0;
margin: 0;
cursor: pointer;

.TextButton {
color: $blue;
line-height: 1.5rem;
padding: 0;
margin: 0;
}

.Icon {
color: $blue;
}
text-align: left;
}
24 changes: 9 additions & 15 deletions src/features/cancel-bid/CancelBidButton/CancelBidButton.tsx
Original file line number Diff line number Diff line change
@@ -1,32 +1,26 @@
import { FC } from 'react';

import { CancelBidModal, CancelBidModalProps } from '..';
import { IconLinkExternal1 } from '@zero-tech/zui/components/Icons';
import { CancelBidModal } from '..';

import styles from './CancelBidButton.module.scss';

interface CancelBidButtonProps {
zna: string;
trigger: string;
variant?: 'primary' | 'text';
}

export const CancelBidButton: FC<CancelBidButtonProps> = ({
zna,
trigger,
variant = 'primary',
}) => {
const triggerVariant: CancelBidModalProps['trigger'] =
variant === 'text' ? textButton : 'Cancel Bid';
const triggerVariant =
variant === 'text' ? (
<p className={styles.TextButton}>{trigger}</p>
) : (
trigger
);

return <CancelBidModal zna={zna} trigger={triggerVariant} />;
};

/**************
* textButton
**************/

const textButton = (
<div className={styles.Container}>
<p className={styles.TextButton}>{'Cancel Bid'}</p>
<IconLinkExternal1 className={styles.Icon} size={'1.15rem'} isFilled />
</div>
);
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
@import '../../../../node_modules/@zero-tech/zui/styles/_colors.scss';

.TextButton {
color: $blue;
line-height: 1.5rem;
padding: 0;
margin: 0;
cursor: pointer;
text-align: center;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import { FC, ReactNode } from 'react';

import { DomainSettingsModal } from '../DomainSettingsModal';

import styles from './DomainSettingsButton.module.scss';

type DomainSettingsButtonProps = {
zna: string;
trigger: ReactNode;
variant?: 'primary' | 'text';
};

export const DomainSettingsButton: FC<DomainSettingsButtonProps> = ({
zna,
trigger,
variant,
}) => {
const triggerVariant =
variant === 'text' ? (
<p className={styles.TextButton}>{trigger}</p>
) : (
trigger
);

return <DomainSettingsModal trigger={triggerVariant} zna={zna} />;
};
1 change: 1 addition & 0 deletions src/features/domain-settings/DomainSettingsButton/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './DomainSettingsButton';
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.Container {
width: 35.625rem;
padding: 3rem;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
import { FC, useState } from 'react';
domw30 marked this conversation as resolved.
Show resolved Hide resolved

import { useWeb3 } from '../../../lib/hooks/useWeb3';
import { BasicModalProps } from '../../../lib/types/ui';

import { ConnectWallet } from '../../ui/ConnectWallet';
import { Modal } from '@zero-tech/zui/components';

import styles from './DomainSettingsModal.module.scss';

export interface DomainSettingsModalProps extends BasicModalProps {
zna: string;
}

export const DomainSettingsModal: FC<DomainSettingsModalProps> = ({
zna,
...modalProps
}) => {
const { account } = useWeb3();

const [isModalOpen, setIsModalOpen] = useState<boolean>(false);

const onClose = () => {
setIsModalOpen(false);
};

const content = account ? (
<>Domain Settings</>
) : (
<ConnectWallet message={'Connect your wallet to view domain settings.'} />
);

return (
<Modal
className={styles.Container}
open={isModalOpen}
onOpenChange={(isOpen: boolean) => setIsModalOpen(isOpen)}
{...modalProps}
>
{content}
</Modal>
);
};
1 change: 1 addition & 0 deletions src/features/domain-settings/DomainSettingsModal/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './DomainSettingsModal';
2 changes: 2 additions & 0 deletions src/features/domain-settings/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export * from './DomainSettingsButton';
export * from './DomainSettingsModal';
10 changes: 10 additions & 0 deletions src/features/place-bid/PlaceBidButton/PlaceBidButton.module.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
@import '../../../../node_modules/@zero-tech/zui/styles/_colors.scss';

.TextButton {
color: $blue;
line-height: 1.5rem;
padding: 0;
margin: 0;
cursor: pointer;
text-align: center;
}
18 changes: 16 additions & 2 deletions src/features/place-bid/PlaceBidButton/PlaceBidButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,25 @@ import { FC, ReactNode } from 'react';

import { PlaceBidModal } from '..';

import styles from './PlaceBidButton.module.scss';

type PlaceBidButtonProps = {
zna: string;
trigger: ReactNode;
variant?: 'primary' | 'text';
};

export const PlaceBidButton: FC<PlaceBidButtonProps> = ({ zna, trigger }) => {
return <PlaceBidModal trigger={trigger} zna={zna} />;
export const PlaceBidButton: FC<PlaceBidButtonProps> = ({
zna,
trigger,
variant,
}) => {
const triggerVariant =
variant === 'text' ? (
<p className={styles.TextButton}>{trigger}</p>
) : (
trigger
);

return <PlaceBidModal trigger={triggerVariant} zna={zna} />;
};
2 changes: 1 addition & 1 deletion src/features/set-buy-now/SetBuyNow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export const SetBuyNow: FC = () => {
const content = account ? (
<>Set Buy Now</>
) : (
<ConnectWallet message={'Connect your wallet.'} />
<ConnectWallet message={'Connect your wallet to set buy now price.'} />
);

return content;
Expand Down
10 changes: 7 additions & 3 deletions src/features/set-buy-now/SetBuyNowButton.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
import { FC } from 'react';
import { FC, ReactNode } from 'react';

import { SetBuyNowModal } from './SetBuyNowModal';

export const SetBuyNowButton: FC = () => (
<SetBuyNowModal trigger={'Set Buy Now'} />
type SetBuyNowButtonProps = {
trigger: ReactNode;
};

export const SetBuyNowButton: FC<SetBuyNowButtonProps> = ({ trigger }) => (
<SetBuyNowModal trigger={trigger} />
);
12 changes: 10 additions & 2 deletions src/features/ui/StatsList/StatsList.module.scss
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
.Stats {
display: flex;
margin: 0.5rem 0 1rem 0;
flex-direction: column;
margin: 1rem 0;
padding: 0;
gap: 1rem;
list-style: none;

gap: 0.5rem;

> * {
flex: 1;
}

@media only screen and (min-width: 878px) {
flex-direction: row;

gap: 1rem;
}
}
6 changes: 4 additions & 2 deletions src/features/view-bids/ViewBidsButton/ViewBidsButton.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { FC } from 'react';
import { FC, ReactNode } from 'react';

import { ViewBidsModal } from '../ViewBidsModal';
import { IconLinkExternal1 } from '@zero-tech/zui/components/Icons';
Expand All @@ -7,14 +7,16 @@ import styles from './ViewBidsButton.module.scss';

interface ViewBidsButtonProps {
zna: string;
trigger: ReactNode;
variant?: 'primary' | 'text';
}

export const ViewBidsButton: FC<ViewBidsButtonProps> = ({
zna,
trigger,
variant = 'primary',
}) => {
const triggerVariant = variant === 'text' ? textButton : 'View Bids';
const triggerVariant = variant === 'text' ? textButton : trigger;

return <ViewBidsModal zna={zna} trigger={triggerVariant} />;
};
Expand Down
27 changes: 0 additions & 27 deletions src/features/view-nft/Actions/Actions.module.scss

This file was deleted.

Loading