forked from TurboWarp/scratch-gui
-
Notifications
You must be signed in to change notification settings - Fork 189
Expand file tree
/
Copy pathcommunity-button.jsx
More file actions
46 lines (41 loc) · 1.25 KB
/
community-button.jsx
File metadata and controls
46 lines (41 loc) · 1.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
import classNames from 'classnames';
import {FormattedMessage} from 'react-intl';
import PropTypes from 'prop-types';
import React from 'react';
import Button from '../button/button.jsx';
import communityIcon from './icon--see-community.svg';
import styles from './community-button.css';
const CommunityButton = ({
className,
onClick
}) => (
<Button
className={classNames(
className,
styles.communityButton
)}
onClick={onClick}
>
<span style={{ display: 'flex', alignItems: 'center', gap: '4px' }}>
<img
src={communityIcon}
className={styles.communityButtonIcon}
alt="See Project Page"
style={{ filter: (typeof window !== 'undefined' && window.isHighContrast) ? 'invert(1)' : 'none' }}
/>
<FormattedMessage
defaultMessage="See Project Page"
description="Label for see project page button"
id="gui.menuBar.seeProjectPage"
/>
</span>
</Button>
);
CommunityButton.propTypes = {
className: PropTypes.string,
onClick: PropTypes.func
};
CommunityButton.defaultProps = {
onClick: () => {}
};
export default CommunityButton;