Skip to content

Commit

Permalink
add hooks for schema comparitor
Browse files Browse the repository at this point in the history
  • Loading branch information
jonaslagoni committed Nov 13, 2023
1 parent 38534cd commit b52f7d8
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions components/Asyncapi3Comparison.js
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,8 @@ export function Asyncapi3OperationComparison({ className = '' }) {
export function Asyncapi3SchemaFormatComparison({ className = '' }) {
const [hoverState, setHoverState] = useState({
SchemaFormat: false,
Payload: false
Payload: false,
Schema: false
});

return (
Expand All @@ -340,7 +341,7 @@ export function Asyncapi3SchemaFormatComparison({ className = '' }) {
<div className={(hoverState.Payload ? `bg-yellow-300` : 'bg-white') + ` flex-1 border border-yellow-600 p-2 m-2`} onMouseOver={() => setHoverState(prevState => ({ ...prevState, Payload: true }))} onMouseLeave={() => setHoverState({ Payload: false })}>
payload
<div className="flex flex-wrap flex-1">
<div className={'bg-white flex-1 border border-orange-300 p-2 m-2'}>
<div className={(hoverState.Schema ? `bg-blue-300` : 'bg-white') + ' flex-1 border border-orange-300 p-2 m-2'} onMouseOver={() => setHoverState(prevState => ({ ...prevState, Schema: true }))} onMouseLeave={() => setHoverState({ Schema: false })}>
schema
</div>
</div>
Expand Down Expand Up @@ -375,7 +376,7 @@ export function Asyncapi3SchemaFormatComparison({ className = '' }) {
<div className={(hoverState.SchemaFormat ? `bg-orange-100` : 'bg-white ') + ` flex-1 border border-orange-300 p-2 m-2`} onMouseOver={() => setHoverState(prevState => ({ ...prevState, SchemaFormat: true }))} onMouseLeave={() => setHoverState({ SchemaFormat: false })}>
schemaFormat
</div>
<div className={'bg-white flex-1 border border-orange-300 p-2 m-2'}>
<div className={(hoverState.Schema ? `bg-blue-300` : 'bg-white') + ' flex-1 border border-orange-300 p-2 m-2'} onMouseOver={() => setHoverState(prevState => ({ ...prevState, Schema: true }))} onMouseLeave={() => setHoverState({ Schema: false })}>
schema
</div>
</div>
Expand Down

0 comments on commit b52f7d8

Please sign in to comment.