MCPcopy
hub / github.com/kestra-io/kestra / render

Function render

ui/tests/storybook/components/MultiPanelTabs.stories.tsx:23–48  ·  view source on GitHub ↗
({modelValue})

Source from the content-addressed store, hash-verified

21type Story = StoryObj<typeof MultiPanelTabs>;
22
23const render: Story["render"] = ({modelValue}) => ({
24 setup() {
25 const modelValueRef = ref();
26 modelValueRef.value = modelValue;
27
28 const labelStyle: StyleValue = {
29 position: "absolute",
30 top: 0,
31 left: "0",
32 color: "white",
33 fontSize: "12px",
34 textAlign: "right",
35 padding: "0 1rem"
36 };
37
38 return () => <div style="padding: 1rem;border: 1px solid var(--ks-border-primary); border-radius: 4px; margin: 1rem; background: var(--ks-background-body)">
39 <div style={{...labelStyle, background: "red", width: "250px"}}>This is an example of 250px wide element.</div>
40 <div style={{...labelStyle, background: "blue", width: "800px", top: "20px"}}>This is an example of 800px wide element.</div>
41 <MultiPanelTabs modelValue={modelValueRef.value} />
42 <pre>{JSON.stringify(modelValueRef.value.map((p:any) => ({
43 tabs:p.tabs.map((t:any) => t.value),
44 size: p.size ? Math.round(p.size) : "<undefined>",
45 })))}</pre>
46 </div>
47 }
48})
49
50
51const BG_COLORS = [

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected