Stories were throwing without AuthModal/CreateFlow providers, autodocs was a no-op, and several DS/create-flow screens had no stories.
37 lines
838 B
JavaScript
37 lines
838 B
JavaScript
import React, { useState } from "react";
|
|
import AddCustomField from "../../app/components/controls/AddCustomField";
|
|
|
|
/** Figma: Add Custom Field — node `20235:12994` (Community Rule System). */
|
|
export default {
|
|
title: "Components/Controls/AddCustomField",
|
|
component: AddCustomField,
|
|
decorators: [
|
|
(Story) => (
|
|
<div className="w-[min(100%,546px)] bg-[var(--color-surface-default-primary)] p-6">
|
|
<Story />
|
|
</div>
|
|
),
|
|
],
|
|
};
|
|
|
|
export const Collapsed = {
|
|
render: () => {
|
|
const [active, setActive] = useState(false);
|
|
return (
|
|
<AddCustomField
|
|
active={active}
|
|
onPressAdd={() => setActive(true)}
|
|
onSelectFieldType={() => {}}
|
|
/>
|
|
);
|
|
},
|
|
};
|
|
|
|
export const Expanded = {
|
|
args: {
|
|
active: true,
|
|
onPressAdd: () => {},
|
|
onSelectFieldType: () => {},
|
|
},
|
|
};
|