refactor: enforce frontend view model boundaries
This commit is contained in:
@@ -41,16 +41,17 @@ const meta = {
|
||||
},
|
||||
render: (arguments_) => {
|
||||
const { onAction, withAction, ...stateProps } = arguments_;
|
||||
|
||||
return (
|
||||
<StateView
|
||||
{...stateProps}
|
||||
action={
|
||||
(withAction)
|
||||
? ((
|
||||
withAction
|
||||
? (
|
||||
<Button onClick={onAction} variant="default">
|
||||
{arguments_.error ? "Повторить локально" : "Выполнить пример"}
|
||||
</Button>
|
||||
))
|
||||
)
|
||||
: undefined
|
||||
}
|
||||
/>
|
||||
@@ -63,6 +64,7 @@ const meta = {
|
||||
export default meta;
|
||||
|
||||
type Story = StoryObj<typeof meta>;
|
||||
|
||||
export const Empty: Story = { name: "Пустое состояние" };
|
||||
export const EmptyWithAction: Story = {
|
||||
args: { withAction: true },
|
||||
|
||||
Reference in New Issue
Block a user