Skip to content

Commit

Permalink
feat: add telegam icon and transition for svg path (#577)
Browse files Browse the repository at this point in the history
Co-authored-by: AlekseyShatohin <[email protected]>
  • Loading branch information
AlekseyShatohin and AlekseyShatohin authored Dec 4, 2023
1 parent 354ea63 commit c08018d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/core/src/main/ts/icon/Icon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ export interface IconProps {
| 'star'
| 'star-solid'
| 'success'
| 'telegram'
| 'terminal'
| 'terminal-client'
| 'transfer'
Expand All @@ -105,6 +106,7 @@ export interface IconProps {
| 'youtube'
size?: Value
color?: string
transition?: string
}

export const IconPaths: { [name in IconProps['name']]: string } = {
Expand Down Expand Up @@ -261,6 +263,8 @@ export const IconPaths: { [name in IconProps['name']]: string } = {
'M13.13 3.764l1.586 4.44a1.2 1.2 0 0 0 1.13.796h4.84a1.2 1.2 0 0 1 .768 2.122L17.4 14.5a1.2 1.2 0 0 0-.385 1.251l1.205 4.219a1.2 1.2 0 0 1-1.874 1.29l-3.626-2.72a1.2 1.2 0 0 0-1.44 0l-3.568 2.676a1.2 1.2 0 0 1-1.87-1.304l1.322-4.421a1.2 1.2 0 0 0-.418-1.295l-3.954-3.045A1.2 1.2 0 0 1 3.524 9h4.63a1.2 1.2 0 0 0 1.13-.796l1.586-4.44a1.2 1.2 0 0 1 2.26 0z',
success:
'M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10zm-3.293-9.707a1 1 0 1 0-1.414 1.414l2.5 2.5a1 1 0 0 0 1.414 0l5.5-7.5a1 1 0 1 0-1.414-1.414L10.5 14.086l-1.793-1.793z',
telegram:
'M20.4974 5.51783C20.3331 5.53899 20.0243 5.61304 19.3282 5.86688C18.4611 6.18308 17.0925 6.73852 14.7874 7.70198C13.186 8.37131 9.97691 9.76029 5.15248 11.8725C5.17381 11.8792 5.19549 11.8861 5.21755 11.8931L5.23402 11.8983C5.35015 11.935 5.47558 11.9746 5.60463 12.0167C6.01407 12.1505 6.48712 12.2932 6.92237 12.4029C7.38084 12.5184 7.71905 12.5766 7.89354 12.5804C8.14052 12.5858 8.53365 12.4826 9.10333 12.0895L9.10989 12.085L9.1099 12.085C11.3678 10.5534 13.0823 9.39862 14.2517 8.62192C14.8357 8.23402 15.2878 7.93773 15.6051 7.73513C15.7629 7.63443 15.8939 7.55268 15.9939 7.49317C16.0429 7.46397 16.0935 7.43479 16.1404 7.40987L16.1407 7.40967C16.1486 7.40525 16.2821 7.3302 16.4393 7.29435C16.4414 7.29387 16.4438 7.29331 16.4465 7.2927C16.5004 7.28027 16.6602 7.24345 16.8424 7.24488C17.0477 7.24649 17.377 7.29659 17.6682 7.55665C17.9631 7.82009 18.046 8.14916 18.0718 8.32366C18.0976 8.49878 18.0902 8.67894 18.0545 8.83171C18.0164 8.99506 17.9464 9.11571 17.921 9.1586C17.8857 9.21824 17.8488 9.27049 17.819 9.3104C17.7589 9.391 17.6878 9.47486 17.6177 9.55395C17.475 9.71479 17.2865 9.91141 17.0757 10.1241C16.6515 10.5523 16.097 11.0864 15.5448 11.6105C14.9911 12.1359 14.433 12.6577 13.9998 13.0624L13.9366 13.1215C13.7467 13.2989 13.5844 13.4505 13.4599 13.5676C13.3907 13.6325 13.3349 13.6853 13.2933 13.725C13.259 13.7577 13.242 13.7743 13.2363 13.78C13.234 13.7822 13.2335 13.7827 13.2343 13.7819C13.1038 13.9181 12.9736 14.045 12.858 14.1571C12.8446 14.1701 12.8315 14.1828 12.8186 14.1953C12.7159 14.2948 12.6284 14.3795 12.5478 14.462C12.4761 14.5353 12.4207 14.5959 12.3778 14.6474C12.4426 14.7075 12.546 14.7917 12.7072 14.8984C13.3905 15.3509 13.9376 15.7253 14.4775 16.0948L14.5532 16.1466C15.1178 16.5329 15.6824 16.9186 16.404 17.3939C16.616 17.5335 16.82 17.6797 17.0004 17.809C17.0356 17.8342 17.0699 17.8588 17.1031 17.8825C17.3169 18.0351 17.4948 18.1584 17.6638 18.2582C17.9562 18.4308 18.1521 18.4901 18.3218 18.4901C18.3236 18.4878 18.3254 18.4854 18.3274 18.4828C18.3987 18.3874 18.5302 18.1379 18.6312 17.5952C19.181 14.642 20.2519 8.29268 20.4965 5.71019C20.5005 5.66824 20.5015 5.60015 20.4974 5.51783ZM21.1166 3.56281C21.3157 3.61062 21.6003 3.70781 21.8585 3.91833C22.3181 4.29312 22.4172 4.78789 22.45 4.9802C22.4818 5.16712 22.5202 5.55559 22.4875 5.90061C22.2332 8.58545 21.1456 15.0186 20.5971 17.9648C20.347 19.3087 19.7327 20.3811 18.5731 20.4883C17.7968 20.5601 17.1577 20.2903 16.6508 19.9911C16.4002 19.8431 16.1605 19.6749 15.9449 19.521C15.9061 19.4933 15.868 19.466 15.8306 19.4392C15.6505 19.3102 15.4838 19.1908 15.3076 19.0747C14.5704 18.5892 13.9936 18.1952 13.4275 17.8078L13.3539 17.7575C12.8131 17.3874 12.277 17.0205 11.6067 16.5766C11.1454 16.2711 10.7375 15.9158 10.5048 15.4679C10.2342 14.9473 10.2586 14.4191 10.4563 13.9662C10.568 13.7103 10.7314 13.4869 10.8911 13.3019C10.6769 13.447 10.4572 13.5959 10.2321 13.7487C9.47975 14.2671 8.67576 14.6077 7.85034 14.5898C7.43304 14.5807 6.90616 14.4708 6.43592 14.3523C5.94246 14.228 5.42319 14.0708 4.98636 13.9281C4.89247 13.8974 4.79193 13.8657 4.68788 13.833C4.3029 13.7117 3.86987 13.5753 3.54781 13.4185C3.33101 13.313 3.05044 13.1481 2.83227 12.8787C2.58226 12.5699 2.45912 12.1783 2.51214 11.7533C2.5821 11.1925 2.96495 10.8251 3.24448 10.6165C3.54643 10.3912 3.93044 10.2 4.35243 10.0305C9.17495 7.91914 12.3998 6.52322 14.0193 5.84631C16.3171 4.88588 17.7283 4.31227 18.646 3.97763C19.5464 3.64927 20.0771 3.50897 20.5685 3.50027C20.7159 3.49766 20.9111 3.51348 21.1166 3.56281ZM17.0749 9.1868C17.0959 9.17563 17.0912 9.17951 17.0686 9.19022C17.0715 9.18861 17.0735 9.18749 17.0749 9.1868Z',
terminal:
'M6 10v10h12V10H6zm.366-2h11.268l-1.143-4H7.51L6.366 8zM6 22a2 2 0 0 1-2-2V9.28a2 2 0 0 1 .077-.55l1.509-5.28A2 2 0 0 1 7.509 2h8.982a2 2 0 0 1 1.923 1.45l1.509 5.28a2 2 0 0 1 .077.55V20a2 2 0 0 1-2 2H6z',
'terminal-client':
Expand Down Expand Up @@ -288,6 +292,7 @@ export const Icon: FC<IconProps> = ({
name,
size = 6,
color = '#000',
transition,
...rest
}) => (
<Svg
Expand All @@ -297,7 +302,7 @@ export const Icon: FC<IconProps> = ({
viewBox="0 0 24 24"
focusable="false"
>
<Path d={IconPaths[name]} fill={color} />
<Path transition={transition} d={IconPaths[name]} fill={color} />
</Svg>
)

Expand Down

0 comments on commit c08018d

Please sign in to comment.