Advertisement
ziriuz84

Untitled

Mar 5th, 2025
394
1
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import Link from '@mui/material/Link';
  2. import { styled } from '@mui/material/styles';
  3.  
  4. // ----------------------------------------------------------------------
  5.  
  6. export type MoreLinksProps = React.ComponentProps<typeof MoreLinksRoot> & {
  7.   links?: string[];
  8. };
  9.  
  10. export function MoreLinks({ links, sx, ...other }: MoreLinksProps) {
  11.   return (
  12.     <MoreLinksRoot sx={sx} {...other}>
  13.       {links?.map((href) => (
  14.         <li key={href}>
  15.           <Link href={href} variant="body2" target="_blank" rel="noopener">
  16.             {href}
  17.           </Link>
  18.         </li>
  19.       ))}
  20.     </MoreLinksRoot>
  21.   );
  22. }
  23.  
  24. // ----------------------------------------------------------------------
  25.  
  26. const MoreLinksRoot = styled('ul')(() => ({
  27.   display: 'flex',
  28.   flexDirection: 'column',
  29.   '& > li': { display: 'flex' },
  30. }));
  31.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement