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

Feature/5 chakra v1 #10

Open
wants to merge 5 commits into
base: production
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 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
2 changes: 1 addition & 1 deletion components/about/aboutUsSection.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Box, Text } from '@chakra-ui/core'
import { Box, Text } from '@chakra-ui/react'

import Section from '../common/section'
import UnderlinedHeading from '../common/underlinedHeading'
Expand Down
2 changes: 1 addition & 1 deletion components/about/contactForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
Textarea,
Alert,
AlertIcon
} from '@chakra-ui/core'
} from '@chakra-ui/react'

import { useState } from 'react'
import PropTypes from 'prop-types'
Expand Down
4 changes: 2 additions & 2 deletions components/about/contactSection.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Box, Text } from '@chakra-ui/core'
import { Box, Text } from '@chakra-ui/react'
import { useState } from 'react'

import Section from '../common/section'
Expand All @@ -25,7 +25,7 @@ const ContactSection = ({ contactPage, hideHeading, ...props }) => {
{...props}
>
<UnderlinedHeading as={contactPage ? 'h1' : 'h2'} className={hideHeading ? 'sr-only' : ''} text='Contact Us' align='center' />
<Card shadowSz='lg' w='100%' maxW='45rem'>
<Card shadowSz='lg' boxSize='100%' maxW='45rem'>
{!formSubmit && (
<Text
textTransform='uppercase'
Expand Down
4 changes: 2 additions & 2 deletions components/common/authProcess.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
Heading,
FormControl,
FormLabel
} from '@chakra-ui/core'
} from '@chakra-ui/react'

import { useForm } from 'react-hook-form'

Expand Down Expand Up @@ -196,7 +196,7 @@ const AuthProcess = ({
justify='space-between'
aria-live='polite'
>
<Icon name={icon} size='6rem' marginBottom='1.5rem' />
<Icon name={icon} boxSize='6rem' marginBottom='1.5rem' />
<Heading
as='h1'
fontSize='2rem'
Expand Down
4 changes: 2 additions & 2 deletions components/common/backButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {
Flex,
Text,
Link
} from '@chakra-ui/core'
} from '@chakra-ui/react'
import { ArrowBackIcon } from '@chakra-ui/icons'
import { useRouter } from 'next/router'

Expand All @@ -12,7 +12,7 @@ const BackButton = () => {
return (
<Link onClick={() => router.back()}>
<Flex flexDirection='row' position='absolute' zIndex={1000} top='10rem' left='5rem' padding='1rem' cursor='pointer'>
<ArrowBackIcon w='1.5rem' h='1.5rem' />
<ArrowBackIcon boxSize='1.5rem' />
<Text paddingLeft='1rem'>Back</Text>
</Flex>
</Link>
Expand Down
4 changes: 2 additions & 2 deletions components/common/banner.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {
Flex,
Icon,
CloseButton
} from '@chakra-ui/core'
} from '@chakra-ui/react'

const Banner = ({ icon, children, onCloseClick }) => {
return (
Expand All @@ -22,7 +22,7 @@ const Banner = ({ icon, children, onCloseClick }) => {
>
<Icon
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this needs to be the CustomIcon because it seems chakra/icons doesn't have the celebration icon that we use for the banner

name={icon}
size={{ base: '2rem', md: '3rem' }}
boxSize={{ base: '2rem', md: '3rem' }}
marginRight={{ base: 0, md: '1.5rem' }}
marginBottom={{ base: '1.5rem', md: 0 }}
/>
Expand Down
2 changes: 1 addition & 1 deletion components/common/button.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {
Button
} from '@chakra-ui/core'
} from '@chakra-ui/react'

const FBButton = (props) => {
return (
Expand Down
2 changes: 1 addition & 1 deletion components/common/card.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// White card with a box shadow used for forms, select plans, install instuctions, etc.
import { Box } from '@chakra-ui/core'
import { Box } from '@chakra-ui/react'
import PropTypes from 'prop-types'

const shadowSizes = {
Expand Down
2 changes: 1 addition & 1 deletion components/common/divider.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Box } from '@chakra-ui/core'
import { Box } from '@chakra-ui/react'

const Divider = (props) => (
<Box
Expand Down
4 changes: 2 additions & 2 deletions components/common/errorMessage.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Alert, AlertIcon } from '@chakra-ui/core'
import { Alert, AlertIcon } from '@chakra-ui/react'

const ErrorMessage = ({ msg, iconSize, children, ...props }) => (
<Alert
Expand All @@ -15,7 +15,7 @@ const ErrorMessage = ({ msg, iconSize, children, ...props }) => (
>
<AlertIcon
color='#b9423a'
size={iconSize || '1.5rem'}
boxSize={iconSize || '1.5rem'}
marginBottom={{ base: '1rem', md: 0 }}
/>
<span>
Expand Down
2 changes: 1 addition & 1 deletion components/common/faqHeading.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Heading } from '@chakra-ui/core'
import { Heading } from '@chakra-ui/react'

// used for FAQ and How it Works page
const FAQHeading = ({ children, ...props }) => (
Expand Down
2 changes: 1 addition & 1 deletion components/common/fbButton.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Button } from '@chakra-ui/core'
import { Button } from '@chakra-ui/react'
import { defaultProps } from '../../utils/defaultBtnProps'
import PropTypes from 'prop-types'

Expand Down
2 changes: 1 addition & 1 deletion components/common/fbTextInput.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Input } from '@chakra-ui/core'
import { Input } from '@chakra-ui/react'

const FBTextInput = ({ id, type, register, ...props }) => (
<Input
Expand Down
2 changes: 1 addition & 1 deletion components/common/footer.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react'
import { useAuth } from '../../utils/useAuth'

import { Flex, List, ListItem, Text, Box } from '@chakra-ui/core'
import { Flex, List, ListItem, Text, Box } from '@chakra-ui/react'

import TextLink from './textLink'
import styles from './footer.module.scss'
Expand Down
2 changes: 1 addition & 1 deletion components/common/formControl.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {
FormControl,
FormLabel
} from '@chakra-ui/core'
} from '@chakra-ui/react'

const FBFormControl = ({ labelText, id, required, children, ...props }) => (
<FormControl marginBottom='1.5rem' isRequired={required} {...props}>
Expand Down
2 changes: 1 addition & 1 deletion components/common/githubButton.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Button, Image, Link } from '@chakra-ui/core'
import { Button, Image, Link } from '@chakra-ui/react'
import { defaultProps } from '../../utils/defaultBtnProps'
import { useLocalStorage } from '../../utils/useLocalStorage'
import { localStorageGHStateKey } from '../../utils/constants'
Expand Down
4 changes: 2 additions & 2 deletions components/common/header/authNav.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
MenuButton,
MenuList,
MenuItem
} from '@chakra-ui/core'
} from '@chakra-ui/react'
import { AddIcon } from '@chakra-ui/icons'

const AuthNav = ({ user, onLogout }) => {
Expand Down Expand Up @@ -80,7 +80,7 @@ const AuthNav = ({ user, onLogout }) => {
<Icon
name={isExpanded ? 'chevron-up' : 'chevron-down'}
marginLeft='.5rem'
size='1.5rem'
boxSize='1.5rem'
/>
</MenuButton>
<MenuList backgroundColor='lightRock'>
Expand Down
2 changes: 1 addition & 1 deletion components/common/header/header.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useRouter } from 'next/router'
import { useAuth } from '../../../utils/useAuth'

import { Box, Flex } from '@chakra-ui/core'
import { Box, Flex } from '@chakra-ui/react'

import LinkBtn from '../linkBtn'
import TextLink from '../textLink'
Expand Down
2 changes: 1 addition & 1 deletion components/common/header/logo.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Link as ChakraLink, Box } from '@chakra-ui/core'
import { Link as ChakraLink, Box } from '@chakra-ui/react'
import Link from 'next/link'
import FullLogo from './fullLogo'
import FBLogoLetters from './logoLetters'
Expand Down
2 changes: 1 addition & 1 deletion components/common/header/logoLetters.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Flex } from '@chakra-ui/core'
import { Flex } from '@chakra-ui/react'
import PropTypes from 'prop-types'

const FBLogoLetters = ({ id, ...props }) => {
Expand Down
9 changes: 9 additions & 0 deletions components/common/icons.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { createIcon } from '@chakra-ui/react'

import icons from '../../public/icons'

export const DuotoneStarIcon = createIcon(icons.duotoneStar)
export const SmileIcon = createIcon(icons.smile)
export const StackIcon = createIcon(icons.stack)
export const EquitableIcon = createIcon(icons.equitable)
export const GivingHandIcon = createIcon(icons.givingHand)
6 changes: 3 additions & 3 deletions components/common/linkBtn.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { PseudoBox } from '@chakra-ui/core'
import { Box } from '@chakra-ui/react'
import { defaultProps } from '../../utils/defaultBtnProps'
import PropTypes from 'prop-types'

const LinkBtn = ({ children, ...props }) => (
<PseudoBox as='a' display='inline-block' {...props}>
<Box as='a' display='inline-block' {...props}>
{children}
</PseudoBox>
</Box>
)

LinkBtn.defaultProps = { ...defaultProps }
Expand Down
6 changes: 3 additions & 3 deletions components/common/pageWrapper.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { PseudoBox, Flex } from '@chakra-ui/core'
import { Box, Flex } from '@chakra-ui/react'

import PropTypes from 'prop-types'
import FBHead from './head'
Expand All @@ -21,7 +21,7 @@ const PageWrapper = (props) => (
<SkipLink />
<Flex direction='column' minH='100vh'>
<Header />
<PseudoBox
<Box
as='main'
id='main-content'
tabIndex='-1'
Expand All @@ -34,7 +34,7 @@ const PageWrapper = (props) => (
}}
>
{props.children}
</PseudoBox>
</Box>
<Footer />
</Flex>
</>
Expand Down
2 changes: 1 addition & 1 deletion components/common/percentInput.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useState } from 'react'
import { Flex, Input } from '@chakra-ui/core'
import { Flex, Input } from '@chakra-ui/react'
import PropTypes from 'prop-types'

const PercentInput = ({ onChange, initialValue, id, ...props }) => {
Expand Down
2 changes: 1 addition & 1 deletion components/common/section.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Box } from '@chakra-ui/core'
import { Box } from '@chakra-ui/react'

const Section = ({ backgroundColor, children, ...props }) => (
<Box
Expand Down
8 changes: 4 additions & 4 deletions components/common/stepper.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Box, Text, PseudoBox, List, ListItem, Icon } from '@chakra-ui/core'
import { Box, Text, List, ListItem, Icon } from '@chakra-ui/react'
import PropTypes from 'prop-types'

const iconHeight = 2
Expand All @@ -22,7 +22,7 @@ const Step = ({ step, i, currentStep }) => (
<>
<Icon
name={step.iconName}
size={`${iconHeight}rem`}
boxSize={`${iconHeight}rem`}
marginBottom='1rem'
/>
<Text aria-current={i + 1 === currentStep ? 'step' : 'false'}>
Expand All @@ -41,7 +41,7 @@ const Step = ({ step, i, currentStep }) => (
)

const Stepper = ({ steps, currentStep = 2 }) => (
<PseudoBox
<Box
display='flex'
justifyItems='center'
position='relative'
Expand Down Expand Up @@ -71,7 +71,7 @@ const Stepper = ({ steps, currentStep = 2 }) => (
<Step key={i} step={stepData} i={i} currentStep={currentStep} />
))}
</List>
</PseudoBox>
</Box>
)

Stepper.propTypes = {
Expand Down
2 changes: 1 addition & 1 deletion components/common/stepperSection.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Flex } from '@chakra-ui/core'
import { Flex } from '@chakra-ui/react'
import PropTypes from 'prop-types'

import Stepper from '../common/stepper'
Expand Down
2 changes: 1 addition & 1 deletion components/common/subheading.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Text } from '@chakra-ui/core'
import { Text } from '@chakra-ui/react'

// This is the large text in each section that sits below the underlined section title
const Subheading = ({ align, children, ...props }) => (
Expand Down
2 changes: 1 addition & 1 deletion components/common/textLink.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Link as ChakraLink } from '@chakra-ui/core'
import { Link as ChakraLink } from '@chakra-ui/react'
import Link from 'next/link'
import PropTypes from 'prop-types'

Expand Down
6 changes: 3 additions & 3 deletions components/common/underlinedHeading.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { PseudoBox, Box } from '@chakra-ui/core'
import { Box } from '@chakra-ui/react'
import PropTypes from 'prop-types'

/*
Expand All @@ -9,7 +9,7 @@ The default is an h2 since that is how it is used mostly in the design, but to c

const UnderlinedHeading = ({ text, align, lineGap, lineColor, ...props }) => {
return (
<PseudoBox textAlign={align} {...props} lineHeight={lineGap}>
<Box textAlign={align} {...props} lineHeight={lineGap}>
<Box as='span' display='block' letterSpacing='1px'>
{props.children}
{text}
Expand All @@ -22,7 +22,7 @@ const UnderlinedHeading = ({ text, align, lineGap, lineColor, ...props }) => {
h='0.1875rem'
backgroundColor={lineColor}
/>
</PseudoBox>
</Box>
)
}

Expand Down
2 changes: 1 addition & 1 deletion components/common/updateIlpModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
ModalContent,
Box,
ModalHeader
} from '@chakra-ui/core'
} from '@chakra-ui/react'
import { useState } from 'react'
import { useForm } from 'react-hook-form'

Expand Down
2 changes: 1 addition & 1 deletion components/dashboard/usernameModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
ModalContent,
Box,
ModalHeader
} from '@chakra-ui/core'
} from '@chakra-ui/react'
import { useState } from 'react'
import { useForm } from 'react-hook-form'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
Button,
Box,
useDisclosure
} from '@chakra-ui/core'
} from '@chakra-ui/react'

import TextLink from '../../common/textLink'
import SettingsCard from './settingsCard'
Expand Down
2 changes: 1 addition & 1 deletion components/maintainer/settings/manageRevenueSection.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {
Flex,
Box,
useToast
} from '@chakra-ui/core'
} from '@chakra-ui/react'
import { useState } from 'react'

import SettingsCard from './settingsCard'
Expand Down
2 changes: 1 addition & 1 deletion components/maintainer/settings/settingsCard.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Card from '../../common/card'

import { Heading } from '@chakra-ui/core'
import { Heading } from '@chakra-ui/react'

const SettingsCard = ({ headingText, children }) => (
<Card shadowSz='lg' w='100%' maxW='50rem' marginBottom='3rem'>
Expand Down
2 changes: 1 addition & 1 deletion components/maintainer/settings/usernameSection.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
Button,
Box,
useDisclosure
} from '@chakra-ui/core'
} from '@chakra-ui/react'

import SettingsCard from './settingsCard'
import UpdateUsernameModal from '../../dashboard/usernameModal'
Expand Down
2 changes: 1 addition & 1 deletion components/signup/verify_recaptcha.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { useRouter } from 'next/router'
import Head from 'next/head'
import { decode } from 'b36'
import Recaptcha from 'react-recaptcha'
import { Flex, Text } from '@chakra-ui/core'
import { Flex, Text } from '@chakra-ui/react'

import { useLocalStorage } from '../../utils/useLocalStorage'
import { localStorageGHStateKey } from '../../utils/constants'
Expand Down
Loading