Changeset View
Changeset View
Standalone View
Standalone View
landing/assets/comm-logo.react.js
// @flow | // @flow | ||||
import * as React from 'react'; | import * as React from 'react'; | ||||
function CommLogo(): React.Node { | type Props = { | ||||
+size?: number, | |||||
}; | |||||
function CommLogo(props: Props): React.Node { | |||||
const { size } = props; | |||||
return ( | return ( | ||||
<svg | <svg | ||||
width="50" | width={size || 50} | ||||
height="50" | height={size || 50} | ||||
atul: Because `0` is falsey, if someone passed in size={0}, this would actually display the… | |||||
viewBox="0 0 50 50" | viewBox="0 0 50 50" | ||||
fill="none" | fill="none" | ||||
xmlns="http://www.w3.org/2000/svg" | xmlns="http://www.w3.org/2000/svg" | ||||
> | > | ||||
<circle cx="25.9641" cy="25" r="25" fill="#0A0A0A" /> | <circle cx="25.9641" cy="25" r="25" fill="#0A0A0A" /> | ||||
<path | <path | ||||
d="M26.7559 40.0763C24.7029 40.0763 22.8524 39.7662 21.2042 39.1459C19.556 38.4975 18.1537 37.553 16.9971 36.3124C15.8405 35.0437 14.9441 33.4789 14.308 31.6181C13.6718 29.7291 13.3538 27.5299 13.3538 25.0206C13.3538 22.5395 13.6718 20.3404 14.308 18.4232C14.9441 16.4778 15.8405 14.8566 16.9971 13.5597C18.1537 12.2345 19.556 11.2336 21.2042 10.557C22.8524 9.88032 24.7029 9.54199 26.7559 9.54199C29.5607 9.54199 31.8739 10.1059 33.6955 11.2336C35.5172 12.3332 36.9774 14.0813 38.0762 16.4778L32.3944 19.3536C31.9895 18.113 31.3534 17.1262 30.486 16.3932C29.6474 15.6319 28.4041 15.2513 26.7559 15.2513C24.8186 15.2513 23.2572 15.8716 22.0717 17.1121C20.9151 18.3245 20.3368 20.1007 20.3368 22.4409V27.1775C20.3368 29.5176 20.9151 31.3079 22.0717 32.5485C23.2572 33.7608 24.8186 34.367 26.7559 34.367C28.3752 34.367 29.6619 33.9441 30.6161 33.0983C31.5992 32.2242 32.3221 31.1811 32.7847 29.9687L38.1629 33.0137C37.0352 35.2692 35.5461 37.0173 33.6955 38.2578C31.8739 39.4702 29.5607 40.0763 26.7559 40.0763Z" | d="M26.7559 40.0763C24.7029 40.0763 22.8524 39.7662 21.2042 39.1459C19.556 38.4975 18.1537 37.553 16.9971 36.3124C15.8405 35.0437 14.9441 33.4789 14.308 31.6181C13.6718 29.7291 13.3538 27.5299 13.3538 25.0206C13.3538 22.5395 13.6718 20.3404 14.308 18.4232C14.9441 16.4778 15.8405 14.8566 16.9971 13.5597C18.1537 12.2345 19.556 11.2336 21.2042 10.557C22.8524 9.88032 24.7029 9.54199 26.7559 9.54199C29.5607 9.54199 31.8739 10.1059 33.6955 11.2336C35.5172 12.3332 36.9774 14.0813 38.0762 16.4778L32.3944 19.3536C31.9895 18.113 31.3534 17.1262 30.486 16.3932C29.6474 15.6319 28.4041 15.2513 26.7559 15.2513C24.8186 15.2513 23.2572 15.8716 22.0717 17.1121C20.9151 18.3245 20.3368 20.1007 20.3368 22.4409V27.1775C20.3368 29.5176 20.9151 31.3079 22.0717 32.5485C23.2572 33.7608 24.8186 34.367 26.7559 34.367C28.3752 34.367 29.6619 33.9441 30.6161 33.0983C31.5992 32.2242 32.3221 31.1811 32.7847 29.9687L38.1629 33.0137C37.0352 35.2692 35.5461 37.0173 33.6955 38.2578C31.8739 39.4702 29.5607 40.0763 26.7559 40.0763Z" | ||||
fill="white" | fill="white" | ||||
Show All 23 Lines |
Because 0 is falsey, if someone passed in size={0}, this would actually display the equivalent of size={50}. Could we instead do size ?? 50?
In practice I really doubt it matters since I don't imagine anyone passing in size={0}, but just for correctness I guess.