Skip to content

Commit afd5e8c

Browse files
refactor: added consistent styling for buttons and tags (#1099)
Co-authored-by: Cody's Dad <40604284+AceTheCreator@users.noreply.github.com>
1 parent 2b90976 commit afd5e8c

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

library/src/components/Schema.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -209,15 +209,15 @@ export const Schema: React.FunctionComponent<Props> = ({
209209
{schema.default() !== undefined && (
210210
<div className="text-xs">
211211
Default value:
212-
<span className="border inline-block text-orange-600 rounded ml-1 py-0 px-2">
212+
<span className="inline-block bg-orange-600 text-white rounded ml-1 py-0 px-2">
213213
{SchemaHelpers.prettifyValue(schema.default())}
214214
</span>
215215
</div>
216216
)}
217217
{schema.const() !== undefined && (
218218
<div className="text-xs">
219219
Const:
220-
<span className="border inline-block text-orange-600 rounded ml-1 py-0 px-2">
220+
<span className="inline-block bg-orange-600 text-white rounded ml-1 py-0 px-2">
221221
{SchemaHelpers.prettifyValue(schema.const())}
222222
</span>
223223
</div>
@@ -228,7 +228,7 @@ export const Schema: React.FunctionComponent<Props> = ({
228228
{schema.enum()?.map((e, idx) => (
229229
<li
230230
key={idx}
231-
className="border inline-block text-orange-600 rounded ml-1 py-0 px-2"
231+
className="inline-block bg-orange-600 text-white rounded ml-1 py-0 px-2"
232232
>
233233
<span>{SchemaHelpers.prettifyValue(e)}</span>
234234
</li>
@@ -259,7 +259,7 @@ export const Schema: React.FunctionComponent<Props> = ({
259259
{schema.examples()?.map((e, idx) => (
260260
<li
261261
key={idx}
262-
className="border inline-block text-orange-600 rounded ml-1 py-0 px-2 break-all"
262+
className="inline-block bg-orange-600 text-white rounded ml-1 py-0 px-2 break-all"
263263
>
264264
<span>{SchemaHelpers.prettifyValue(e)}</span>
265265
</li>

library/src/containers/Messages/Message.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ export const Message: React.FunctionComponent<Props> = ({
9191
<div className="border bg-gray-100 rounded px-4 py-2 mt-2">
9292
<div className="text-sm text-gray-700">
9393
Message ID
94-
<span className="border text-orange-600 rounded text-xs ml-2 py-0 px-2">
94+
<span className="bg-orange-600 text-white rounded text-xs ml-2 py-0 px-2">
9595
{messageId}
9696
</span>
9797
</div>
@@ -102,7 +102,7 @@ export const Message: React.FunctionComponent<Props> = ({
102102
<div className="border bg-gray-100 rounded px-4 py-2 mt-2">
103103
<div className="text-sm text-gray-700">
104104
Correlation ID
105-
<span className="border text-orange-600 rounded text-xs ml-2 py-0 px-2">
105+
<span className="bg-orange-600 text-white rounded text-xs ml-2 py-0 px-2">
106106
{correlationId.location()}
107107
</span>
108108
</div>

library/src/containers/Operations/Operation.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ export const OperationInfo: React.FunctionComponent<Props> = (props) => {
170170
const specV = useSpec().version();
171171
const version = specV.localeCompare('2.6.0', undefined, { numeric: true });
172172
const isAsyncAPIv2 = version === 0;
173-
const { borderColor, typeLabel } =
173+
const { backgroundColor, typeLabel } =
174174
CommonHelpers.getOperationDesignInformation({
175175
type,
176176
config,
@@ -181,7 +181,7 @@ export const OperationInfo: React.FunctionComponent<Props> = (props) => {
181181
<div className="mb-4">
182182
<h3>
183183
<span
184-
className={`font-mono border uppercase p-1 rounded mr-2 ${borderColor}`}
184+
className={`font-mono text-white uppercase p-1 rounded mr-2 ${backgroundColor}`}
185185
title={type}
186186
>
187187
{typeLabel}
@@ -223,7 +223,7 @@ export const OperationInfo: React.FunctionComponent<Props> = (props) => {
223223
<div className="border bg-gray-100 rounded px-4 py-2 mt-2">
224224
<div className="text-sm text-gray-700">
225225
Operation ID
226-
<span className="border text-orange-600 rounded text-xs ml-2 py-0 px-2">
226+
<span className="bg-orange-600 text-white rounded text-xs ml-2 py-0 px-2">
227227
{operationId}
228228
</span>
229229
</div>

0 commit comments

Comments
 (0)