diff --git a/ui/src/components/card/card.styles.ts b/ui/src/components/card/card.styles.ts index aff24f5..495ebdf 100644 --- a/ui/src/components/card/card.styles.ts +++ b/ui/src/components/card/card.styles.ts @@ -2,6 +2,7 @@ import { styled } from '@/theme'; export abstract class CardStyles { static readonly Container = styled('div', { + width: '$full', backgroundColor: '$slate2', borderRadius: '$xlh', padding: '$7', diff --git a/ui/src/components/core/button/button-content.tsx b/ui/src/components/core/button/button-content.tsx index ba054bd..abd2314 100644 --- a/ui/src/components/core/button/button-content.tsx +++ b/ui/src/components/core/button/button-content.tsx @@ -1,57 +1,23 @@ import React from 'react'; import { ButtonProps } from '.'; -import { - StyledButtonContentFlex, - StyledButtonContentGrid, -} from './button-content.styles'; import { ButtonIcon } from './button-icon'; export type ButtonContentProps = Pick< ButtonProps, - | 'leftIcon' - | 'rightIcon' - | 'topIcon' - | 'bottomIcon' - | 'children' - | 'iconSpacing' + 'leftIcon' | 'rightIcon' | 'children' >; export const ButtonContent: React.FC = (props) => { - const { - leftIcon, - rightIcon, - topIcon, - bottomIcon, - children, - iconSpacing = '1h', - } = props; + const { leftIcon, rightIcon, children } = props; const midNode = ( <> - {leftIcon && ( - - {leftIcon} - - )} + {leftIcon && {leftIcon}} {children} - {rightIcon && ( - - {rightIcon} - - )} + {rightIcon && {rightIcon}} ); - if (!topIcon && !bottomIcon) { - return midNode; - } - - return ( - - {topIcon && {topIcon}} - {midNode} - {bottomIcon && {bottomIcon}} - - ); + return midNode; }; diff --git a/ui/src/components/core/button/button.styles.ts b/ui/src/components/core/button/button.styles.ts index 9259bca..0c3756b 100644 --- a/ui/src/components/core/button/button.styles.ts +++ b/ui/src/components/core/button/button.styles.ts @@ -49,11 +49,6 @@ export interface ButtonProps extends StyledButtonProps { * @type React.ReactElement */ bottomIcon?: React.ReactElement; - /** - * The space between the button icon and label. - * @type SystemProps["marginRight"] - */ - iconSpacing?: string; /** * Replace the spinner component when `isLoading` is set to `true` * @type React.ReactElement diff --git a/ui/src/components/core/button/button.tsx b/ui/src/components/core/button/button.tsx index fbe402a..c275bb6 100644 --- a/ui/src/components/core/button/button.tsx +++ b/ui/src/components/core/button/button.tsx @@ -13,9 +13,6 @@ export const Button = forwardStyledRef( spinnerPlacement = 'start', spinner, loadingText, - iconSpacing, - topIcon, - bottomIcon, rightIcon, leftIcon, isFullWidth, @@ -26,9 +23,6 @@ export const Button = forwardStyledRef( const contentProps = { rightIcon, leftIcon, - bottomIcon, - topIcon, - iconSpacing, children, }; @@ -40,16 +34,12 @@ export const Button = forwardStyledRef( data-loading={isLoading} css={{ width: isFullWidth ? '100%' : undefined, - ...(ownProps?.css || {}), + ...ownProps?.css, }} {...ownProps} > {isLoading && spinnerPlacement === 'start' && ( - + {spinner} )} @@ -65,11 +55,7 @@ export const Button = forwardStyledRef( )} {isLoading && spinnerPlacement === 'end' && ( - + {spinner} )} diff --git a/ui/src/components/core/button/icon-button.tsx b/ui/src/components/core/button/icon-button.tsx index 3061d9a..32ec420 100644 --- a/ui/src/components/core/button/icon-button.tsx +++ b/ui/src/components/core/button/icon-button.tsx @@ -8,7 +8,6 @@ type OmittedProps = | 'isFullWidth' | 'rightIcon' | 'loadingText' - | 'iconSpacing' | 'spinnerPlacement'; type BaseButtonProps = Omit; diff --git a/ui/src/components/core/color-picker/color-picker.tsx b/ui/src/components/core/color-picker/color-picker.tsx index 8914481..7f7eeaf 100644 --- a/ui/src/components/core/color-picker/color-picker.tsx +++ b/ui/src/components/core/color-picker/color-picker.tsx @@ -62,7 +62,7 @@ export const ColorPicker: React.FC = ({ void; }; export const RowData = forwardStyledRef( - ({ leftIcon, label, rightComponent, ...props }, ref) => { + ({ leftIcon, label, rightComponent, onClick, ...props }, ref) => { + const handleOnClick = (): void => { + if (onClick) onClick(); + }; + return ( - + {leftIcon} {label} diff --git a/ui/src/components/step/step.styles.ts b/ui/src/components/step/step.styles.ts new file mode 100644 index 0000000..1a6ed4f --- /dev/null +++ b/ui/src/components/step/step.styles.ts @@ -0,0 +1,26 @@ +import { Flex } from '@/components'; +import { styled } from '@/theme'; + +export const StepStyles = { + Container: styled(Flex, { + flexDirection: 'column', + alignItems: 'center', + justifyContent: 'center', + width: '$full', + gap: '$6', + + '@media (min-width: 768px)': { + flexDirection: 'row', + justifyContent: 'center', + }, + + '@media (min-width: 1024px)': { + gap: '$34', + }, + }), + Indicator: styled(Flex, { + flexDirection: 'column', + justifyContent: 'center', + maxWidth: '$106', + }), +}; diff --git a/ui/src/components/step/step.tsx b/ui/src/components/step/step.tsx index 57d00af..bfa6beb 100644 --- a/ui/src/components/step/step.tsx +++ b/ui/src/components/step/step.tsx @@ -1,37 +1,6 @@ -import { Flex, Stepper } from '@/components'; +import { Stepper } from '@/components'; -type StepperIndicatorContainerProps = { - children: React.ReactNode; -}; - -const StepperIndicatorContainer: React.FC = ({ - children, -}: StepperIndicatorContainerProps) => { - return ( - - {children} - - ); -}; - -type MintStepContainerProps = { - children: React.ReactNode; -}; - -const Container: React.FC = ({ - children, -}: MintStepContainerProps) => ( - - {children} - -); +import { StepStyles as S } from './step.styles'; type StepProps = { children: React.ReactNode; @@ -40,12 +9,12 @@ type StepProps = { export const Step: React.FC = ({ children, header }: StepProps) => { return ( - - + +

{header}

-
+ {children} -
+
); }; diff --git a/ui/src/theme/globals.ts b/ui/src/theme/globals.ts index 7d4fff9..25df9c7 100644 --- a/ui/src/theme/globals.ts +++ b/ui/src/theme/globals.ts @@ -10,6 +10,7 @@ export const themeGlobals = globalCss({ fontFamily: 'Manrope', fontSize: '16px', + '@media (max-width: 850px)': { fontSize: '13px', }, diff --git a/ui/src/views/access-point/ap-form-step/create-ap-form.tsx b/ui/src/views/access-point/ap-form-step/create-ap-form.tsx index 0ff5e55..cce66db 100644 --- a/ui/src/views/access-point/ap-form-step/create-ap-form.tsx +++ b/ui/src/views/access-point/ap-form-step/create-ap-form.tsx @@ -6,7 +6,7 @@ export const CreateAccessPointForm: React.FC = () => { const { prevStep } = Stepper.useContext(); return ( - + { return ( - + diff --git a/ui/src/views/access-point/create-ap-preview.tsx b/ui/src/views/access-point/create-ap-preview.tsx index 6ac9159..069248b 100644 --- a/ui/src/views/access-point/create-ap-preview.tsx +++ b/ui/src/views/access-point/create-ap-preview.tsx @@ -111,7 +111,7 @@ export const CreateAccessPointPreview: React.FC = () => { }, [writeStatus, transactionStatus]); return ( - + { const { nfa } = CreateAccessPoint.useContext(); return ( - + ; + +export const ButtonConnection = forwardStyledRef< + HTMLButtonElement, + ButtonConnectionProps +>(({ icon, label, ...props }, ref) => { + return ( + + ); +}); diff --git a/ui/src/views/mint/github-step/steps/github-connect/github-button.tsx b/ui/src/views/mint/github-step/steps/github-connect/github-button.tsx index 38ef902..1a03f96 100644 --- a/ui/src/views/mint/github-step/steps/github-connect/github-button.tsx +++ b/ui/src/views/mint/github-step/steps/github-connect/github-button.tsx @@ -1,7 +1,7 @@ import { useCallback, useEffect } from 'react'; -import { Button, Icon } from '@/components'; import { githubActions, useAppDispatch, useGithubStore } from '@/store'; +import { ButtonConnection } from '@/views/mint/button-connection'; import { Mint } from '@/views/mint/mint.context'; export const GithubButton: React.FC = () => { @@ -18,22 +18,11 @@ export const GithubButton: React.FC = () => { }, [setGithubStep, state]); return ( - + /> ); }; diff --git a/ui/src/views/mint/github-step/steps/github-connect/github-connect-step.tsx b/ui/src/views/mint/github-step/steps/github-connect/github-connect-step.tsx index 14c1efb..a69030b 100644 --- a/ui/src/views/mint/github-step/steps/github-connect/github-connect-step.tsx +++ b/ui/src/views/mint/github-step/steps/github-connect/github-connect-step.tsx @@ -7,13 +7,18 @@ export const GithubConnect: React.FC = () => { const { prevStep } = Stepper.useContext(); return ( - + After connecting your GitHub, your repositories will show here. diff --git a/ui/src/views/mint/github-step/steps/github-repo-configuration/repo-configuration-body/repo-branch-commit-fields.styles.ts b/ui/src/views/mint/github-step/steps/github-repo-configuration/repo-configuration-body/repo-branch-commit-fields.styles.ts new file mode 100644 index 0000000..aba1a84 --- /dev/null +++ b/ui/src/views/mint/github-step/steps/github-repo-configuration/repo-configuration-body/repo-branch-commit-fields.styles.ts @@ -0,0 +1,13 @@ +import { Text } from '@/components'; +import { styled } from '@/theme'; + +export const TextStyles = styled(Text, { + maxWidth: '12.5rem', + + '@media (min-width: 375px)': { + maxWidth: '17rem', + }, + '@media (min-width: 425px)': { + maxWidth: '18rem', + }, +}); diff --git a/ui/src/views/mint/github-step/steps/github-repo-configuration/repo-configuration-body/repo-branch-commit-fields.tsx b/ui/src/views/mint/github-step/steps/github-repo-configuration/repo-configuration-body/repo-branch-commit-fields.tsx index e91250c..e3ea135 100644 --- a/ui/src/views/mint/github-step/steps/github-repo-configuration/repo-configuration-body/repo-branch-commit-fields.tsx +++ b/ui/src/views/mint/github-step/steps/github-repo-configuration/repo-configuration-body/repo-branch-commit-fields.tsx @@ -10,6 +10,7 @@ import { import { AppLog } from '@/utils'; import { Mint } from '@/views/mint/mint.context'; import { useMintFormContext } from '@/views/mint/nfa-step/form-step'; +import { TextStyles } from './repo-branch-commit-fields.styles'; export const RepoBranchCommitFields: React.FC = () => { const { queryLoading, branches } = useGithubStore(); @@ -105,12 +106,16 @@ export const RepoBranchCommitFields: React.FC = () => { {(selected) => ( <> - {selected?.name || 'Select a branch'} + + {selected?.name || 'Select a branch'} + )} - {(item) => item.name} + + {(item) => {item.name}} + )} diff --git a/ui/src/views/mint/github-step/steps/github-repo-configuration/repo-configuration.tsx b/ui/src/views/mint/github-step/steps/github-repo-configuration/repo-configuration.tsx index 8804c71..9e3a7ba 100644 --- a/ui/src/views/mint/github-step/steps/github-repo-configuration/repo-configuration.tsx +++ b/ui/src/views/mint/github-step/steps/github-repo-configuration/repo-configuration.tsx @@ -5,7 +5,7 @@ import { RepoConfigurationHeader } from './repo-configuration-header'; export const GithubRepoConfiguration: React.FC = () => { return ( - + diff --git a/ui/src/views/mint/github-step/steps/github-repository-selection/github-repository-selection.tsx b/ui/src/views/mint/github-step/steps/github-repository-selection/github-repository-selection.tsx index 2053e33..5fb69ba 100644 --- a/ui/src/views/mint/github-step/steps/github-repository-selection/github-repository-selection.tsx +++ b/ui/src/views/mint/github-step/steps/github-repository-selection/github-repository-selection.tsx @@ -81,9 +81,10 @@ export const GithubRepositoryConnection: React.FC = () => { - + diff --git a/ui/src/views/mint/github-step/steps/github-repository-selection/repository.tsx b/ui/src/views/mint/github-step/steps/github-repository-selection/repository.tsx index 60f810d..c11ef5b 100644 --- a/ui/src/views/mint/github-step/steps/github-repository-selection/repository.tsx +++ b/ui/src/views/mint/github-step/steps/github-repository-selection/repository.tsx @@ -30,11 +30,11 @@ export const Repository: React.FC = ({ leftIcon={} label={repository.name} css={{ cursor: 'pointer', my: '$4' }} + onClick={handleSelectRepo} rightComponent={ ); } else { return ( - + /> ); } }} diff --git a/ui/src/views/mint/wallet-step/wallet-step.tsx b/ui/src/views/mint/wallet-step/wallet-step.tsx index 76dacd7..f3bef32 100644 --- a/ui/src/views/mint/wallet-step/wallet-step.tsx +++ b/ui/src/views/mint/wallet-step/wallet-step.tsx @@ -4,7 +4,7 @@ import { ConnectWalletButton } from './connect-wallet-button'; export const WalletStep: React.FC = () => { return ( - + { Connect with the wallet you want to mint & own the NFA.