Skip to content

Commit

Permalink
feat: adjusted stage card
Browse files Browse the repository at this point in the history
  • Loading branch information
paulobressan committed Sep 1, 2023
1 parent 51eeb51 commit a2f2d0b
Showing 1 changed file with 15 additions and 9 deletions.
24 changes: 15 additions & 9 deletions docs/components/configuration.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -183,12 +183,14 @@ export function Configuration() {
add source
</button>

{currentStages.source
? StageCard({
{currentStages.source ? (
<StageCard
value={{
...currentStages.source,
intersect: currentStages.intersect,
})
: null}
}}
/>
) : null}
</div>
<div>
<button
Expand All @@ -197,8 +199,10 @@ export function Configuration() {
>
add filter
</button>
{currentStages[TYPES.FILTERS]?.map((filter, index) => (
<div key={index}>{StageCard(filter)}</div>
{currentStages[TYPES.FILTERS]?.map((value, index) => (
<div key={index}>
<StageCard value={value} />
</div>
))}
</div>

Expand All @@ -210,7 +214,9 @@ export function Configuration() {
add sink
</button>

{currentStages.sink ? StageCard(currentStages.sink) : null}
{currentStages.sink ? (
<StageCard value={currentStages.sink} />
) : null}
</div>
</div>
</div>
Expand Down Expand Up @@ -1727,9 +1733,9 @@ function KafkaStage({ onAdd }) {
);
}

function StageCard(value) {
function StageCard({ value }) {
return (
<div className="border border-gray-500 rounded mt-2 p-2">
<div className="border border-gray-500 rounded mt-2 p-2 relative">
{Object.keys(value).map((k) => (
<div key={k} className="text-gray dark:text-gray-200">
{typeof value[k] == "object" && !Array.isArray(value[k]) ? (
Expand Down

0 comments on commit a2f2d0b

Please sign in to comment.