Skip to content

Commit

Permalink
fix(components-social): change twitter to X (#1224)
Browse files Browse the repository at this point in the history
- Change icon to X.
- Change theme color to #000000.
  • Loading branch information
sabertazimi authored Mar 28, 2024
1 parent f2ff17b commit 2dea2ba
Show file tree
Hide file tree
Showing 8 changed files with 41 additions and 34 deletions.
22 changes: 12 additions & 10 deletions components/Article/__snapshots__/Article.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -300,28 +300,29 @@ exports[`Article should render correctly (snapshot) 1`] = `
class="ant-btn ant-btn-link ant-btn-lg ant-btn-icon-only button"
href="https://twitter.com/intent/tweet?url=https://blog.tazimi.dev/post/1BasicNotes"
role="link"
style="background-color: rgb(29, 161, 242);"
style="background-color: rgb(0, 0, 0);"
tabindex="0"
>
<span
class="ant-btn-icon"
>
<span
aria-label="twitter"
class="anticon anticon-twitter icon"
aria-label="x"
class="anticon anticon-x icon"
role="img"
>
<svg
aria-hidden="true"
data-icon="twitter"
data-icon="x"
fill="currentColor"
fill-rule="evenodd"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M928 254.3c-30.6 13.2-63.9 22.7-98.2 26.4a170.1 170.1 0 0075-94 336.64 336.64 0 01-108.2 41.2A170.1 170.1 0 00672 174c-94.5 0-170.5 76.6-170.5 170.6 0 13.2 1.6 26.4 4.2 39.1-141.5-7.4-267.7-75-351.6-178.5a169.32 169.32 0 00-23.2 86.1c0 59.2 30.1 111.4 76 142.1a172 172 0 01-77.1-21.7v2.1c0 82.9 58.6 151.6 136.7 167.4a180.6 180.6 0 01-44.9 5.8c-11.1 0-21.6-1.1-32.2-2.6C211 652 273.9 701.1 348.8 702.7c-58.6 45.9-132 72.9-211.7 72.9-14.3 0-27.5-.5-41.2-2.1C171.5 822 261.2 850 357.8 850 671.4 850 843 590.2 843 364.7c0-7.4 0-14.8-.5-22.2 33.2-24.3 62.3-54.4 85.5-88.2z"
d="M921 912L601.11 445.75l.55.43L890.08 112H793.7L558.74 384 372.15 112H119.37l298.65 435.31-.04-.04L103 912h96.39L460.6 609.38 668.2 912zM333.96 184.73l448.83 654.54H706.4L257.2 184.73z"
/>
</svg>
</span>
Expand Down Expand Up @@ -738,28 +739,29 @@ exports[`Article should render correctly with partial data (snapshot) 1`] = `
class="ant-btn ant-btn-link ant-btn-lg ant-btn-icon-only button"
href="https://twitter.com/intent/tweet?url=https://blog.tazimi.dev/post/1BasicNotes"
role="link"
style="background-color: rgb(29, 161, 242);"
style="background-color: rgb(0, 0, 0);"
tabindex="0"
>
<span
class="ant-btn-icon"
>
<span
aria-label="twitter"
class="anticon anticon-twitter icon"
aria-label="x"
class="anticon anticon-x icon"
role="img"
>
<svg
aria-hidden="true"
data-icon="twitter"
data-icon="x"
fill="currentColor"
fill-rule="evenodd"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M928 254.3c-30.6 13.2-63.9 22.7-98.2 26.4a170.1 170.1 0 0075-94 336.64 336.64 0 01-108.2 41.2A170.1 170.1 0 00672 174c-94.5 0-170.5 76.6-170.5 170.6 0 13.2 1.6 26.4 4.2 39.1-141.5-7.4-267.7-75-351.6-178.5a169.32 169.32 0 00-23.2 86.1c0 59.2 30.1 111.4 76 142.1a172 172 0 01-77.1-21.7v2.1c0 82.9 58.6 151.6 136.7 167.4a180.6 180.6 0 01-44.9 5.8c-11.1 0-21.6-1.1-32.2-2.6C211 652 273.9 701.1 348.8 702.7c-58.6 45.9-132 72.9-211.7 72.9-14.3 0-27.5-.5-41.2-2.1C171.5 822 261.2 850 357.8 850 671.4 850 843 590.2 843 364.7c0-7.4 0-14.8-.5-22.2 33.2-24.3 62.3-54.4 85.5-88.2z"
d="M921 912L601.11 445.75l.55.43L890.08 112H793.7L558.74 384 372.15 112H119.37l298.65 435.31-.04-.04L103 912h96.39L460.6 609.38 668.2 912zM333.96 184.73l448.83 654.54H706.4L257.2 184.73z"
/>
</svg>
</span>
Expand Down
9 changes: 5 additions & 4 deletions components/Footer/__snapshots__/Footer.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -65,21 +65,22 @@ exports[`Footer should render correctly (snapshot) 1`] = `
class="ant-btn-icon"
>
<span
aria-label="twitter"
class="anticon anticon-twitter icon"
aria-label="x"
class="anticon anticon-x icon"
role="img"
>
<svg
aria-hidden="true"
data-icon="twitter"
data-icon="x"
fill="currentColor"
fill-rule="evenodd"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M928 254.3c-30.6 13.2-63.9 22.7-98.2 26.4a170.1 170.1 0 0075-94 336.64 336.64 0 01-108.2 41.2A170.1 170.1 0 00672 174c-94.5 0-170.5 76.6-170.5 170.6 0 13.2 1.6 26.4 4.2 39.1-141.5-7.4-267.7-75-351.6-178.5a169.32 169.32 0 00-23.2 86.1c0 59.2 30.1 111.4 76 142.1a172 172 0 01-77.1-21.7v2.1c0 82.9 58.6 151.6 136.7 167.4a180.6 180.6 0 01-44.9 5.8c-11.1 0-21.6-1.1-32.2-2.6C211 652 273.9 701.1 348.8 702.7c-58.6 45.9-132 72.9-211.7 72.9-14.3 0-27.5-.5-41.2-2.1C171.5 822 261.2 850 357.8 850 671.4 850 843 590.2 843 364.7c0-7.4 0-14.8-.5-22.2 33.2-24.3 62.3-54.4 85.5-88.2z"
d="M921 912L601.11 445.75l.55.43L890.08 112H793.7L558.74 384 372.15 112H119.37l298.65 435.31-.04-.04L103 912h96.39L460.6 609.38 668.2 912zM333.96 184.73l448.83 654.54H706.4L257.2 184.73z"
/>
</svg>
</span>
Expand Down
4 changes: 2 additions & 2 deletions components/Icons/SocialIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import {
GithubOutlined,
LinkedinOutlined,
RocketOutlined,
TwitterOutlined,
WeiboOutlined,
XOutlined,
} from '@ant-design/icons'
import { socialList } from '@config'
import type { SocialType } from '@types'
Expand All @@ -15,7 +15,7 @@ const SocialIcon = (type: SocialType): JSX.Element => {
case socialList.github:
return <GithubOutlined className={styles.icon} />
case socialList.twitter:
return <TwitterOutlined className={styles.icon} />
return <XOutlined className={styles.icon} />
case socialList.facebook:
return <FacebookOutlined className={styles.icon} />
case socialList.linkedin:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,21 +181,22 @@ exports[`SocialButton should render [twitter] button correctly (snapshot) 1`] =
class="ant-btn-icon"
>
<span
aria-label="twitter"
class="anticon anticon-twitter icon"
aria-label="x"
class="anticon anticon-x icon"
role="img"
>
<svg
aria-hidden="true"
data-icon="twitter"
data-icon="x"
fill="currentColor"
fill-rule="evenodd"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M928 254.3c-30.6 13.2-63.9 22.7-98.2 26.4a170.1 170.1 0 0075-94 336.64 336.64 0 01-108.2 41.2A170.1 170.1 0 00672 174c-94.5 0-170.5 76.6-170.5 170.6 0 13.2 1.6 26.4 4.2 39.1-141.5-7.4-267.7-75-351.6-178.5a169.32 169.32 0 00-23.2 86.1c0 59.2 30.1 111.4 76 142.1a172 172 0 01-77.1-21.7v2.1c0 82.9 58.6 151.6 136.7 167.4a180.6 180.6 0 01-44.9 5.8c-11.1 0-21.6-1.1-32.2-2.6C211 652 273.9 701.1 348.8 702.7c-58.6 45.9-132 72.9-211.7 72.9-14.3 0-27.5-.5-41.2-2.1C171.5 822 261.2 850 357.8 850 671.4 850 843 590.2 843 364.7c0-7.4 0-14.8-.5-22.2 33.2-24.3 62.3-54.4 85.5-88.2z"
d="M921 912L601.11 445.75l.55.43L890.08 112H793.7L558.74 384 372.15 112H119.37l298.65 435.31-.04-.04L103 912h96.39L460.6 609.38 668.2 912zM333.96 184.73l448.83 654.54H706.4L257.2 184.73z"
/>
</svg>
</span>
Expand Down
11 changes: 6 additions & 5 deletions components/SocialGroup/__snapshots__/SocialGroup.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -17,28 +17,29 @@ exports[`SocialGroup should render correctly (snapshot) 1`] = `
class="ant-btn ant-btn-link ant-btn-lg ant-btn-icon-only button"
href="https://twitter.com/intent/tweet?url=https://blog.tazimi.dev"
role="link"
style="background-color: rgb(29, 161, 242);"
style="background-color: rgb(0, 0, 0);"
tabindex="0"
>
<span
class="ant-btn-icon"
>
<span
aria-label="twitter"
class="anticon anticon-twitter icon"
aria-label="x"
class="anticon anticon-x icon"
role="img"
>
<svg
aria-hidden="true"
data-icon="twitter"
data-icon="x"
fill="currentColor"
fill-rule="evenodd"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M928 254.3c-30.6 13.2-63.9 22.7-98.2 26.4a170.1 170.1 0 0075-94 336.64 336.64 0 01-108.2 41.2A170.1 170.1 0 00672 174c-94.5 0-170.5 76.6-170.5 170.6 0 13.2 1.6 26.4 4.2 39.1-141.5-7.4-267.7-75-351.6-178.5a169.32 169.32 0 00-23.2 86.1c0 59.2 30.1 111.4 76 142.1a172 172 0 01-77.1-21.7v2.1c0 82.9 58.6 151.6 136.7 167.4a180.6 180.6 0 01-44.9 5.8c-11.1 0-21.6-1.1-32.2-2.6C211 652 273.9 701.1 348.8 702.7c-58.6 45.9-132 72.9-211.7 72.9-14.3 0-27.5-.5-41.2-2.1C171.5 822 261.2 850 357.8 850 671.4 850 843 590.2 843 364.7c0-7.4 0-14.8-.5-22.2 33.2-24.3 62.3-54.4 85.5-88.2z"
d="M921 912L601.11 445.75l.55.43L890.08 112H793.7L558.74 384 372.15 112H119.37l298.65 435.31-.04-.04L103 912h96.39L460.6 609.38 668.2 912zM333.96 184.73l448.83 654.54H706.4L257.2 184.73z"
/>
</svg>
</span>
Expand Down
2 changes: 1 addition & 1 deletion config/colors.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const socialColors = {
gray: '#767676',
github: '#181717',
twitter: '#1da1f2',
twitter: '#000000',
facebook: '#1877f2',
linkedin: '#0a66c2',
weibo: '#e6162d',
Expand Down
9 changes: 5 additions & 4 deletions layouts/__snapshots__/Layout.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -459,21 +459,22 @@ exports[`Layout should render correctly (snapshot) 1`] = `
class="ant-btn-icon"
>
<span
aria-label="twitter"
class="anticon anticon-twitter icon"
aria-label="x"
class="anticon anticon-x icon"
role="img"
>
<svg
aria-hidden="true"
data-icon="twitter"
data-icon="x"
fill="currentColor"
fill-rule="evenodd"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M928 254.3c-30.6 13.2-63.9 22.7-98.2 26.4a170.1 170.1 0 0075-94 336.64 336.64 0 01-108.2 41.2A170.1 170.1 0 00672 174c-94.5 0-170.5 76.6-170.5 170.6 0 13.2 1.6 26.4 4.2 39.1-141.5-7.4-267.7-75-351.6-178.5a169.32 169.32 0 00-23.2 86.1c0 59.2 30.1 111.4 76 142.1a172 172 0 01-77.1-21.7v2.1c0 82.9 58.6 151.6 136.7 167.4a180.6 180.6 0 01-44.9 5.8c-11.1 0-21.6-1.1-32.2-2.6C211 652 273.9 701.1 348.8 702.7c-58.6 45.9-132 72.9-211.7 72.9-14.3 0-27.5-.5-41.2-2.1C171.5 822 261.2 850 357.8 850 671.4 850 843 590.2 843 364.7c0-7.4 0-14.8-.5-22.2 33.2-24.3 62.3-54.4 85.5-88.2z"
d="M921 912L601.11 445.75l.55.43L890.08 112H793.7L558.74 384 372.15 112H119.37l298.65 435.31-.04-.04L103 912h96.39L460.6 609.38 668.2 912zM333.96 184.73l448.83 654.54H706.4L257.2 184.73z"
/>
</svg>
</span>
Expand Down
9 changes: 5 additions & 4 deletions layouts/__snapshots__/PostLayout.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -445,21 +445,22 @@ exports[`PostLayout should render correctly (snapshot) 1`] = `
class="ant-btn-icon"
>
<span
aria-label="twitter"
class="anticon anticon-twitter icon"
aria-label="x"
class="anticon anticon-x icon"
role="img"
>
<svg
aria-hidden="true"
data-icon="twitter"
data-icon="x"
fill="currentColor"
fill-rule="evenodd"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M928 254.3c-30.6 13.2-63.9 22.7-98.2 26.4a170.1 170.1 0 0075-94 336.64 336.64 0 01-108.2 41.2A170.1 170.1 0 00672 174c-94.5 0-170.5 76.6-170.5 170.6 0 13.2 1.6 26.4 4.2 39.1-141.5-7.4-267.7-75-351.6-178.5a169.32 169.32 0 00-23.2 86.1c0 59.2 30.1 111.4 76 142.1a172 172 0 01-77.1-21.7v2.1c0 82.9 58.6 151.6 136.7 167.4a180.6 180.6 0 01-44.9 5.8c-11.1 0-21.6-1.1-32.2-2.6C211 652 273.9 701.1 348.8 702.7c-58.6 45.9-132 72.9-211.7 72.9-14.3 0-27.5-.5-41.2-2.1C171.5 822 261.2 850 357.8 850 671.4 850 843 590.2 843 364.7c0-7.4 0-14.8-.5-22.2 33.2-24.3 62.3-54.4 85.5-88.2z"
d="M921 912L601.11 445.75l.55.43L890.08 112H793.7L558.74 384 372.15 112H119.37l298.65 435.31-.04-.04L103 912h96.39L460.6 609.38 668.2 912zM333.96 184.73l448.83 654.54H706.4L257.2 184.73z"
/>
</svg>
</span>
Expand Down

0 comments on commit 2dea2ba

Please sign in to comment.