0.0.2 • Published 8 months ago

@licuido-ui/ui_sign-up v0.0.2

Weekly downloads
-
License
MIT
Repository
-
Last release
8 months ago

SignUp

The SignUp component is a reusable React component that provides a signup form with various options. It allows users to sign up using either their email with a password, mobile number, or through social media accounts.

Author

Link

Story Book Link SignUp

PlayGround

Try it have a fun codeBox

Installation

npm i "@licuido-ui/ui_sign-up"

Import component

import { SignUp } from '@licuido-ui/ui_sign-up';

Usage

<SignUp variant='emailWithPasswordSignup' />

Image

alt text

Sample Code

<SignUp  variant= 'emailWithPasswordSignup'
    mainArea= {
      breakpoints: { xs: 6, md: 6, sm: 6, lg: 6 },
    }
    imageSection={
      breakpoints:{ xs: 6, md: 6, sm: 6, lg: 6 },
      src=''
    }
    onSubmit={(data: any) =>{
      console.log(data);
    }}
    cardLogoAltTxt='logo'
    logoSrc= {<Logo />}
    logoHeight= '100%'
    logoWidth= '100%'
    rootStyle= {}
    cardTitle= 'Welcome!'
    cardDescription= 'One positive feedback per day or week can make us grow exponentially'
    cardTitleStyle={}
    buttonText='Sign Up'
    actionText= 'You have an account?'
    actionLink= 'Log in'
    cardStyle= { p: 3 }
    onLoginClick={ () =>{
      console.log('login');
    }}
    actionStyle= { fontSize: { xs: '12px', md: '14px', sm: '14px', lg: '14px' } }
    actionLinkStyle={ fontSize: { xs: '12px', md: '14px', sm: '14px', lg: '14px' } }
    btnStyle={}
    mobileLabelText='Mobile Number'
    mobileLabelStyle= {}
    mobileFieldstyle= {}
    dropDownStyle={}
    mobNumberFontSize=''
    countryCodeFontWeight= ''
    contryCodefontSize= ''
    socialMediaList={[
      {
        label: 'SignUp with google',
        icon: <Google />,
        onSocialmediaSignUp: () => {
          console.log('SignUp with google');
        },
        style: {
          textAlign: 'center',
          width: '100%',
          color: '#3B3B3B',
          fontSize: '14px',
        },
        // SocialMediaButtonStyle: { p: 1 },
      },
      {
        label: 'SignUp with outlook',
        icon: <Google />,
        onSocialmediaSignUp: () => {
          console.log('SignUp with google');
        },
        style: {
          textAlign: 'center',
          width: '100%',
          color: '#3B3B3B',
          fontSize: '14px',
        },
        // SocialMediaButtonStyle: { p: 1 },
      },
    ]}
    emailFieldstyle={}
    emailInputvariant= 'outlined'
    emailLabelStyle= {}
    emailLabel= 'Email'
    passwordLabelStyle= {}
    passwordLabel='Password'
    pwdInputVariant= 'outlined'
    invisibleIcon= {<VisibilityOffOutlinedIcon />}
    visbleIcon= {<VisibilityOutlinedIcon />}
    pwdFieldstyle= {}
    variantContainerSx= {}
    cardHeight= 'auto'
    cardWidth= '400px'
    cardBoxShadow= '0px 8px 20px #0000000A'
    cardBgColor=''
    nameStyle= {}
    fNameLabel= 'First Name'
    fNameLabelStyle= {}
    fnameFieldStyle= {}
    fNameInputVariant='outlined'
    lNameLabel= 'Last Name'
    lNameLabelStyle= {}
    lNameFieldStyle={}/>

Props

Prop NameTypeDefault ValueDescription
signUpIdstring'signUp'A unique identifier for the SignUp component.
classNamestring''CSS class name to apply to the root element of the component.
sxobject{}Custom styling using the MUI SxProps type.
variantstring'emailWithPasswordSignup'The type of signup variant. Can be 'emailWithPasswordSignup', 'mobileNumberSignup', or 'socialMediaSignup'.
onSubmitfunction(detail: object) => undefinedA callback function called when the user submits the form. Receives an object with user details.
mainAreaobjectSee belowConfiguration for the main area of the component.
imageSectionobjectSee belowConfiguration for an optional image section.
rootStyleobject{}Custom styling for the root container.
logoStyleobject{}Custom styling for the logo image.
cardLogoAltTxtstring'logo'Alternative text for the logo image.
cardDescriptionstring''Description text displayed below the card title.
logoWidthstring''Width of the logo image.
logoHeightstring''Height of the logo image.
logoSrcstring or ReactNode''Source URL or ReactNode for the logo image.
cardTitlestring or any''Title text displayed at the top of the card.
variantContainerSxobject{}Custom styling for the container of variant-specific content.
cardTitleStyleobject{}Custom styling for the card title.
buttonTextstring''Text displayed on the primary action button.
actionTextstring''Text displayed below the primary action button.
cardStyleobject{}Custom styling for the card container.
cardBoxShadowstring''Box shadow CSS property for the card.
cardBgColorstring''Background color for the card.
cardHeightstring'auto'Height of the card container.
cardWidthstring'auto'Width of the card container.
btnStyleobject{}Custom styling for the primary action button.
actionLinkstring''URL or link to navigate to when clicking the action text.
actionLinkStyleobject{}Custom styling for the action link.
actionStyleobject{}Custom styling for the action text.
onLoginClickfunction() => undefinedCallback function called when clicking the action text.
socialMediaListarray of objects[]List of social media buttons and their configurations.
mobileLabelStyleobject{}Custom styling for the mobile number label.
mobileLabelTextstring'Mobile Number'Label text for the mobile number input field.
countryCodeFontWeightstring or number''Font weight for the country code dropdown.
contryCodefontSizestring or number''Font size for the country code dropdown.
mobileFieldstyleobject{}Custom styling for the mobile number input field.
mobNumberFontSizestring or number''Font size for the mobile number input field.
dropDownStyleobject{}Custom styling for the country code dropdown.
nameStyleobject{}Custom styling for the name input fields (first name and last name).
fNameLabelstring'First Name'Label for the first name input field.
fNameLabelStyleobject{}Custom styling for the first name label.
fnameFieldStyleobject{}Custom styling for the first name input field.
fNameInputVariantstring'outlined'Input variant for the first name field.
lNameLabelstring'Last Name'Label for the last name input field.
lNameLabelStyleobject{}Custom styling for the last name label.
lNameFieldStyleobject{}Custom styling for the last name input field.
emailLabelstring'Email'Label for the email input field.
emailInputvariantstring'outlined'Input variant for the email field.
emailFieldstyleobject{}Custom styling for the email input field.
emailLabelStyleobject{}Custom styling for the email label.
pwdFieldstyleobject{}Custom styling for the password input field.
passwordLabelStyleobject{}Custom styling for the password label.
passwordLabelstring'Password'Label for the password input field.
pwdInputVariantstring'outlined'Input variant for the password field.
invisibleIconReactNodeVisibilityOffOutlinedIconReact node for the icon indicating invisible password.
visbleIconReactNodeVisibilityOutlinedIconReact node for the icon indicating visible password.

Image Section Properties

PropertyTypeDefault ValueDescription
breakpointsObject{}Breakpoints for customizing the image section.
srcstring''Source URL for the image in the image section.
heightstring''Height of the image in the image section.
widthstring''Width of the image in the image section.
styleObject{}Custom styling for the image section.
backgroundWrapStyleObject{}Custom styling for the background of the image section.
componentReactNodenullA React component to be used in place of the image.

Main Area Properties:

PropertyTypeDefault ValueDescription
breakpointsObject{ xs: 12, md: 6 }Responsive breakpoints for the main area. Specifies the number of columns to display at different screen sizes.
WraperStyleObject{}Custom styling for the main area wrapper using Material-UI's SxProps<Theme>.
cardParentStyleObject{}Custom styling for the card parent container within the main area using Material-UI's SxProps<Theme>.