Skip to content

Commit

Permalink
add AdminLink
Browse files Browse the repository at this point in the history
  • Loading branch information
nicoladj77 committed Sep 10, 2024
1 parent 62406d8 commit 1851cc2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
7 changes: 7 additions & 0 deletions modules/admin/assets/js/components/link/admin-link.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { Link } from '@elementor/ui';

export const AdminLink = ( { href, children } ) => {
return (
<Link underline="hover" variant="body1" href={ href } >{ children }</Link>
);
};
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Box, Grid, Link, Stack, Typography } from '@elementor/ui';
import { Grid, Stack, Typography } from '@elementor/ui';
import { AdminLink } from '../../../../link/admin-link';

export const LinksColumn = ( { linksColumn } ) => {
const { title, links } = linksColumn;
Expand All @@ -8,7 +9,7 @@ export const LinksColumn = ( { linksColumn } ) => {
<Stack gap={ 1 }>
<Typography variant="h6" sx={ { mb: 1 } }>{ title }</Typography>
{ links.map( ( link, i ) => {
return <Link underline="hover" variant="body1" href={ link.url } key={ i }>{ link.title }</Link>;
return <AdminLink href={ link.url } key={ i }>{ link.title }</AdminLink>;
} ) }
</Stack>
</Grid>
Expand Down

0 comments on commit 1851cc2

Please sign in to comment.