Skip to content

Commit

Permalink
added consistent styling for buttons and tags
Browse files Browse the repository at this point in the history
Signed-off-by: Hargun Kaur <[email protected]>
  • Loading branch information
hargunkaur286 committed Oct 19, 2024
1 parent 4253f29 commit a4f5e2b
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions library/src/components/Schema.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -209,15 +209,15 @@ export const Schema: React.FunctionComponent<Props> = ({
{schema.default() !== undefined && (
<div className="text-xs">
Default value:
<span className="border inline-block text-orange-600 rounded ml-1 py-0 px-2">
<span className="inline-block bg-orange-600 text-white rounded ml-1 py-0 px-2">
{SchemaHelpers.prettifyValue(schema.default())}
</span>
</div>
)}
{schema.const() !== undefined && (
<div className="text-xs">
Const:
<span className="border inline-block text-orange-600 rounded ml-1 py-0 px-2">
<span className="inline-block bg-orange-600 text-white rounded ml-1 py-0 px-2">
{SchemaHelpers.prettifyValue(schema.const())}
</span>
</div>
Expand All @@ -228,7 +228,7 @@ export const Schema: React.FunctionComponent<Props> = ({
{schema.enum()?.map((e, idx) => (
<li
key={idx}
className="border inline-block text-orange-600 rounded ml-1 py-0 px-2"
className="inline-block bg-orange-600 text-white rounded ml-1 py-0 px-2"
>
<span>{SchemaHelpers.prettifyValue(e)}</span>
</li>
Expand Down Expand Up @@ -259,7 +259,7 @@ export const Schema: React.FunctionComponent<Props> = ({
{schema.examples()?.map((e, idx) => (
<li
key={idx}
className="border inline-block text-orange-600 rounded ml-1 py-0 px-2 break-all"
className="inline-block bg-orange-600 text-white rounded ml-1 py-0 px-2 break-all"
>
<span>{SchemaHelpers.prettifyValue(e)}</span>
</li>
Expand Down
4 changes: 2 additions & 2 deletions library/src/containers/Messages/Message.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export const Message: React.FunctionComponent<Props> = ({
<div className="border bg-gray-100 rounded px-4 py-2 mt-2">
<div className="text-sm text-gray-700">
Message ID
<span className="border text-orange-600 rounded text-xs ml-2 py-0 px-2">
<span className="bg-orange-600 text-white rounded text-xs ml-2 py-0 px-2">
{messageId}
</span>
</div>
Expand All @@ -102,7 +102,7 @@ export const Message: React.FunctionComponent<Props> = ({
<div className="border bg-gray-100 rounded px-4 py-2 mt-2">
<div className="text-sm text-gray-700">
Correlation ID
<span className="border text-orange-600 rounded text-xs ml-2 py-0 px-2">
<span className="bg-orange-600 text-white rounded text-xs ml-2 py-0 px-2 bg-orange-300">
{correlationId.location()}
</span>
</div>
Expand Down
2 changes: 1 addition & 1 deletion library/src/containers/Messages/MessageExample.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export const Example: React.FunctionComponent<ExampleProps> = ({
className: 'fill-current text-gray-200',
}}
>
<span className="inline-block w-20 py-0.5 mr-1 text-gray-200 text-sm border text-center rounded focus:outline-none">
<span className="inline-block w-20 py-0.5 mr-1 bg-gray-200 text-sm text-center rounded focus:outline-none">
{type}
</span>
</CollapseButton>
Expand Down
6 changes: 3 additions & 3 deletions library/src/containers/Operations/Operation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ export const OperationInfo: React.FunctionComponent<Props> = (props) => {
const specV = useSpec().version();
const version = specV.localeCompare('2.6.0', undefined, { numeric: true });
const isAsyncAPIv2 = version === 0;
const { borderColor, typeLabel } =
const { backgroundColor, typeLabel } =
CommonHelpers.getOperationDesignInformation({
type,
config,
Expand All @@ -181,7 +181,7 @@ export const OperationInfo: React.FunctionComponent<Props> = (props) => {
<div className="mb-4">
<h3>
<span
className={`font-mono border uppercase p-1 rounded mr-2 ${borderColor}`}
className={`font-mono text-white uppercase p-1 rounded mr-2 ${backgroundColor}`}
title={type}
>
{typeLabel}
Expand Down Expand Up @@ -223,7 +223,7 @@ export const OperationInfo: React.FunctionComponent<Props> = (props) => {
<div className="border bg-gray-100 rounded px-4 py-2 mt-2">
<div className="text-sm text-gray-700">
Operation ID
<span className="border text-orange-600 rounded text-xs ml-2 py-0 px-2">
<span className="bg-orange-600 text-white rounded text-xs ml-2 py-0 px-2">
{operationId}
</span>
</div>
Expand Down

0 comments on commit a4f5e2b

Please sign in to comment.