Skip to content

Commit

Permalink
chore: updated twitter icon (#362)
Browse files Browse the repository at this point in the history
* chore: updated twitter icon

* chore: updated RELEASE.md
  • Loading branch information
SaraBianchi authored Oct 12, 2023
1 parent b05c2af commit 74b6130
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 2 deletions.
6 changes: 6 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@
- ...
-->

## Versione X.X.X (dd/mm/yyyy)

### Migliorie

- Aggiornata nuova icona di Twitter

## Versione 7.22.2 (11/10/2023)

### Fix
Expand Down
6 changes: 5 additions & 1 deletion src/components/ItaliaTheme/Icons/Icon.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import classNames from 'classnames';

import DesignIcon from './DesignIcon';
import TelegramSVG from './svg/TelegramSVG';
import XTwitterSVG from './svg/XTwitterSVG';
import { FontAwesomeIcon } from 'design-comuni-plone-theme/components/ItaliaTheme';

const Icon = (props) => {
Expand All @@ -25,10 +26,13 @@ const Icon = (props) => {

const parts = icon.split(' ');

if (icon.indexOf('it-') === 0) {
// TO DO: rimuovere le condizioni dell'icona di twitter quando verrà aggiornato Bootstrap Italia
if (icon.indexOf('it-') === 0 && icon !== 'it-twitter') {
return <DesignIcon {...props} className={classes} {...rest} />;
} else if (icon === 'telegram') {
return <TelegramSVG className={classes} {...rest} />;
} else if (icon === 'it-twitter') {
return <XTwitterSVG className={classes} {...rest} />;
} else if (parts.length > 1) {
return (
<FontAwesomeIcon icon={parts} className={`fal ${classes}`} {...rest} />
Expand Down
18 changes: 18 additions & 0 deletions src/components/ItaliaTheme/Icons/svg/XTwitterSVG.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import * as React from 'react';

const XTwitterSVG = (props) => (
<svg
aria-hidden="true"
focusable="false"
data-prefix="fab"
data-icon="x-twitter"
{...props}
role="img"
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 496 512"
>
<path d="M389.2 48h70.6L305.6 224.2 487 464H345L233.7 318.6 106.5 464H35.8L200.7 275.5 26.8 48H172.4L272.9 180.9 389.2 48zM364.4 421.8h39.1L151.1 88h-42L364.4 421.8z" />
</svg>
);

export default XTwitterSVG;
7 changes: 6 additions & 1 deletion theme/ItaliaTheme/Components/_sharing.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,21 @@
box-shadow: 0 0 0 2px $focus-outline-color;
outline: none;
}

.link-list-wrapper {
z-index: 10;
position: relative;
z-index: 10;

ul {
li {
a.list-item,
button.btn-link {
display: flex;
align-items: center;

.icon {
width: 28px;
height: 28px;
margin-right: 0.5em;
}
}
Expand Down

0 comments on commit 74b6130

Please sign in to comment.