Home > database >  isAny way to import of all variables to packages in JS?
isAny way to import of all variables to packages in JS?

Time:07-22

Hello There my problem simple but i cant find any way to fix this some times when we import just file thats be enough.

like


import './reset.css'
import './App.css';
import "@testing-library/jest-dom";
import 'web-vitals'

when i import like that there package codes are coming to my ide.

so i want to import chakra-ui all variables because some times.

import { Alert ,
  Image,
  Button,
  Text,
  Box, 
  Modal,
    ModalOverlay,
    ModalContent,
    ModalHeader,
    ModalFooter,
    ModalBody,
    ModalCloseButton,
    useDisclosure,
    FormLabel,
    FormControl,
    Input,
    Textarea} from '@chakra-ui/react'

can be like that i want to inject to all variables to my ide(how) i can do that ?

CodePudding user response:

What you could do is following:

import * as chakra from '@chakra-ui/react';

// Then use it like this

const a = new chakra.Image()
  • Related