Skip to content

Commit e075e6c

Browse files
committed
WIP WIP
1 parent 72fd3d3 commit e075e6c

File tree

4 files changed

+36
-9
lines changed

4 files changed

+36
-9
lines changed

docs/platforms/javascript/common/apis.mdx

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,3 +73,24 @@ Sentry.setTag("tag", "value");
7373
example, you might manually record a breadcrumb if the user authenticates or
7474
another state change occurs.
7575
</SdkApi>
76+
77+
<SdkApi
78+
name="captureException"
79+
signature="function captureException(exception: Exception, hint?: Hint): Promise<EventId>"
80+
parameters={[
81+
{
82+
name: "exception",
83+
required: true,
84+
type: "unknown",
85+
description: "The exception to capture.",
86+
},
87+
{
88+
name: "hint",
89+
type: "Record<string, unknown>",
90+
description:
91+
"A hint object containing additional information about the exception.",
92+
},
93+
]}
94+
>
95+
Capture an exception and send it to Sentry.
96+
</SdkApi>

src/components/sdkApi.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export function SdkApi({
5050

5151
{parameters.length ? (
5252
<Expandable title="Parameters">
53-
<SdkDefinitionTable className="bg-white">
53+
<SdkDefinitionTable className="bg-white !w-full">
5454
{parameters.map(param => (
5555
<ApiParameterDef key={param.name} {...param} />
5656
))}

src/components/sdkDefinition/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ type Props = {
1313
export function SdkDefinition({name, children, categorySupported = []}: Props) {
1414
return (
1515
<PlatformCategorySection supported={categorySupported}>
16-
<div>
16+
<div className={styles['sdk-config-option']}>
1717
<h3 id={name} aria-label={name} data-sdk-option>
1818
<a href={`#${name}`}>
1919
<svg
@@ -32,7 +32,7 @@ export function SdkDefinition({name, children, categorySupported = []}: Props) {
3232
</a>
3333
</h3>
3434

35-
{children}
35+
<div className={styles['sdk-config-option-details']}>{children}</div>
3636
</div>
3737
</PlatformCategorySection>
3838
);

src/components/sdkDefinition/style.module.scss

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
.sdk-config-option {
2-
padding-top: 10px;
1+
.sdk-config-option:not(:last-child) {
2+
margin-bottom: 2rem;
33
}
44

55
.sdk-config-option-details {
6-
padding-left: 20px;
6+
padding-left: 0;
77
}
88

99
.sdk-option-table {
1010
--border-radius: 6px;
1111
font-size: 1rem;
1212
margin-top: 1rem;
13-
width: auto !important;
13+
width: auto;
1414

1515
// This is necessary to make rounded borders work :(
1616
border-collapse: separate !important;
@@ -24,10 +24,11 @@
2424
margin-bottom: 0;
2525
}
2626

27-
& tr th, & tr td {
27+
& tr th,
28+
& tr td {
2829
border-bottom-width: 0;
2930
border-right-width: 0;
30-
padding: .5rem .75rem
31+
padding: 0.5rem 0.75rem;
3132
}
3233

3334
& tr:last-child > * {
@@ -54,3 +55,8 @@
5455
border-bottom-right-radius: var(--border-radius);
5556
}
5657
}
58+
59+
// This is to ensure specificity beats .prose table :(
60+
.sdk-config-option .sdk-option-table {
61+
width: auto;
62+
}

0 commit comments

Comments
 (0)