# extendify/0.11.0/src/Library/components/notices/PromotionNotice.js

Extendify, version 0.11.0. 28 lines.

- Page: https://pluginprobe.com/plugins/extendify/0.11.0/code/src/Library/components/notices/PromotionNotice.js
- Raw: https://pluginprobe.com/plugins/extendify/0.11.0/raw/src/Library/components/notices/PromotionNotice.js
- Modified: 2022-08-25T21:16:32+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/extendify/0.11.0/code/src/Library/components/notices/PromotionNotice.js#L10-L20`.

```javascript
import { Button } from '@wordpress/components'
import { General } from '../../api/General'

export default function PromotionNotice({ promotionData }) {
    return (
        <>
            <span className="text-black">{promotionData?.text ?? ''}</span>
            <span className="px-2 opacity-50" aria-hidden="true">
                &#124;
            </span>
            <div className="flex items-center justify-center space-x-2">
                {promotionData?.url && (
                    <Button
                        variant="link"
                        className="h-auto p-0 text-black underline hover:no-underline"
                        href={`${promotionData.url}&utm_source=${window.extendifyData.sdk_partner}`}
                        onClick={async () =>
                            await General.ping('promotion-notice-click')
                        }
                        target="_blank">
                        {promotionData?.button_text}
                    </Button>
                )}
            </div>
        </>
    )
}

```
