Skip to content

Commit 7d9b800

Browse files
committed
screenshot button
1 parent 513ab3e commit 7d9b800

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

packages/feedback-screenshot/src/screenshot.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { convertIntegrationFnToClass, defineIntegration } from '@sentry/core';
22
import type { Integration, IntegrationClass, IntegrationFn } from '@sentry/types';
3-
import { Hello } from './screenshotWidget';
3+
import { ScreenshotButton } from './screenshotWidget';
44
import { GLOBAL_OBJ } from '@sentry/utils';
55
import { h, render } from 'preact';
66

@@ -27,7 +27,7 @@ export const _feedbackScreenshotIntegration = ((options: Partial<FeedbackScreens
2727
return { el: options.el || WINDOW.document.createElement('div'), props: options.props || null };
2828
},
2929
renderScreenshotWidget: (options: FeedbackScreenshotOptions) => {
30-
return render(<Hello />, options.el);
30+
return render(<ScreenshotButton />, options.el);
3131
},
3232
};
3333
}) satisfies IntegrationFn;
Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
1-
import {h} from 'preact';
1+
import { h } from 'preact';
22

33
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
4-
export function Hello() {
5-
return <div>Hello 2</div>;
4+
export function ScreenshotButton() {
5+
return (
6+
<label htmlFor="screenshot" className="form__label">
7+
<span className="form__label__text">Screenshot</span>
8+
<button class="btn btn--default" type="cancel">
9+
Add
10+
</button>
11+
</label>
12+
);
613
}

0 commit comments

Comments
 (0)