Skip to content

Commit bd3fba7

Browse files
committed
Update deprecated
1 parent 7bb37c7 commit bd3fba7

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

packages/gitbook/src/components/DocumentView/OpenAPI/style.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,10 @@
142142
@apply py-2.5 flex flex-col gap-2;
143143
}
144144

145+
.openapi-schema[data-deprecated="true"] {
146+
@apply bg-gray-100;
147+
}
148+
145149
.openapi-section-body .openapi-schema-properties {
146150
@apply divide-y divide-tint-subtle;
147151
}

packages/react-openapi/src/OpenAPISchema.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,11 @@ function OpenAPISchemaProperty(props: {
3737
const id = useId();
3838

3939
return (
40-
<div id={id} className={clsx('openapi-schema', className)}>
40+
<div
41+
id={id}
42+
data-deprecated={schema.deprecated}
43+
className={clsx('openapi-schema', className)}
44+
>
4145
<OpenAPISchemaPresentation property={property} />
4246
{(() => {
4347
const circularRefId = parentCircularRefs.get(schema);

0 commit comments

Comments
 (0)