uptechteam / FE-admin-material-template

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

React admin template MUI

Table of Contents

Installing

Requirements:

Run locally

  1. Install dependencies
yarn install
  1. Start dev server
yarn start
  1. Open http://localhost:3000 in a browser

Developing

Tech stack

Language

Core Frameworks

UI Libraries

Content guide

Project structure

app/
  public/
    favicon.ico
  src/
    assets/
      images/
    components/
      atoms/
      molecules/
      organisms/
      templates/
    core/
      constants/
      types/
      hooks/
      hocs/
      helpers/
    pages/
    styles/
    utils/

Component folder structure

organisms/
  Modal/
    hooks/
      useModal.ts
      useModal.utils.ts
    Modal.tsx
    Modal.test.tsx
    Modal.styles.ts
    Modal.types.ts
    Modal.utils.ts

Component structure

import React from 'react';
import Auth from 'aws-cognito';
... // internal libraries

import { ... } from '@constants';
import { useValidation } from '@hooks';
... // global helpers

import { ... } from '@atoms';
import { ... } from '@molecules';
import { ... } from '@mui/material';
... // components

import { ... } from './Form.styles';
import { ... } from './Form.utils';
import { FormDataType } from './Form.types';
import { useForm } from './hooks/useForm';
... // component helpers

interface Props extends HTMLAttributes<HTMLFormElement> {
  ...
};

export const Form: React.FC<Props> = ({ onSubmit, ...attributes }) => {
  const [formData, onChange, handleOnSubmit] = useForm(onSubmit);

  if (!formData) {
    return null;
  }

  return (
    <form { ...attributes } onChange={onChange}>
      ...
    <form>
  );
};

About


Languages

Language:TypeScript 88.0%Language:SCSS 9.9%Language:HTML 1.8%Language:Shell 0.3%