From 1fd2b7dd288db199505f569ab8d108b8c4f5772f Mon Sep 17 00:00:00 2001 From: Joonas Tiala Date: Wed, 17 Apr 2024 11:20:28 +0300 Subject: [PATCH] docs: add a new decorator for storybook --- apps/docs/utils/decorators.tsx | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/apps/docs/utils/decorators.tsx b/apps/docs/utils/decorators.tsx index 5289477..d112245 100644 --- a/apps/docs/utils/decorators.tsx +++ b/apps/docs/utils/decorators.tsx @@ -1,6 +1,34 @@ import { Decorator } from "@storybook/react"; import { useEffect, useState } from "react"; +export const hiddenLabelDecorator: (htmlFor: string) => Decorator = ( + htmlFor, +) => { + const decorator: Decorator = (Story) => ( + <> + + + + ); + + return decorator; +}; + export const marginDecorator: ( margin: | {