Skip to content

Commit

Permalink
chore: updated twitter icon (#361)
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 98031d5 commit ce75b74
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 1 deletion.
4 changes: 4 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@

## Versione X.X.X (06/10/2023)

### Migliorie

- Aggiornata nuova icona di Twitter

### Fix

- Uniformato e impostato a sinistra l'allineamento del testo nel blocco Elenco nella variazione Quadratoni con immagine
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;
4 changes: 4 additions & 0 deletions src/theme/ItaliaTheme/Components/_sharing.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,18 @@
.btn.dropdown-toggle {
text-decoration: underline;
}

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

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

0 comments on commit ce75b74

Please sign in to comment.