Monday, December 18, 2023

Multiple function component use and EXPORT COMPONENT in SINGLE JSX FILE

Multiple function component use and EXPORT COMPONENT 

in SINGLE JSX FILE 


एक ही फाइल (FILE)  में दो कंपोनेंट का उपयोग कैसे करें :-

और निर्यात (EXPORT) कैसे करें का उपयोग करें : -




import React from 'react';
import { Typography } from "@mui/material";

const Headingtypography = ({ name }) => {  
    return (
        <>
            <Typography variant="h6" sx={{ fontFamily: 'Roboto', fontWeight: 'bold', color: 'black' }} gutterBottom>      
                {name}
            </Typography>
        </>
    );
}

const Subheading = ({ name }) => {  
    return (
        <>
            <Typography variant="h6" sx={{ fontFamily: 'Roboto', fontWeight: 'bold', color: 'black' }} gutterBottom>      
                {name}
            </Typography>
        </>
    );
}

export { Headingtypography, Subheading };

No comments:

Post a Comment