You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

34 line
935 B

  1. // material-ui
  2. import {useState, useEffect} from 'react';
  3. import { useIntl } from 'react-intl';
  4. import iAmSmartICon from 'assets/images/icons/icon_iAmSmart.png';
  5. import {
  6. Button,
  7. Typography
  8. }from '@mui/material';
  9. // ==============================|| EVENT TABLE ||============================== //
  10. export function IAmSmartButton({ label, onClickFun, fullWidth }) {
  11. const intl = useIntl();
  12. const [_label, set_label] = useState("");
  13. useEffect(()=>{
  14. set_label(label);
  15. }
  16. ,[label]);
  17. const doOnClick=()=>{
  18. onClickFun();
  19. }
  20. return (
  21. <Button onClick={()=>doOnClick()} sx={{textTransform: 'none'}} color="iAmSmart" fullWidth={fullWidth} size="large" variant="outlined" startIcon={<img src={iAmSmartICon} alt={intl.formatMessage({ id: 'iAmSmartAlt' })} width="30" />}>
  22. <Typography variant="h5">
  23. {_label}
  24. </Typography>
  25. </Button>
  26. );
  27. }