From fbf1a821c4012cd2a78fccb17ffc6c79f14f2193 Mon Sep 17 00:00:00 2001 From: Stephen Mathieson <571265+stephenmathieson@users.noreply.github.com> Date: Fri, 13 Dec 2024 16:59:42 -0500 Subject: [PATCH] docs: Do not use `defaultProps` See https://github.com/dequelabs/cauldron/pull/1764#issuecomment-2542433467 --- docs/pages/components.mdx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/pages/components.mdx b/docs/pages/components.mdx index 39547c778..b4e9ef197 100644 --- a/docs/pages/components.mdx +++ b/docs/pages/components.mdx @@ -25,6 +25,7 @@ Components should generally be crafted using the following standards. There may - Primitive/Pattern components should always use `React.forwardRef` to provide direct access to the component's primary element - All components should include a `displayName` - All components should be functional (i.e. do not use class components) +- All components may not rely on `defaultProps` and should use default parameters instead - All components should be named using [Pascal case](https://en.wiktionary.org/wiki/Pascal_case) - All components should include typescript types for component props - Polymorphic components should support using `as` property providing the capability for components to render as a different component under the hood @@ -46,4 +47,4 @@ Additionally, components should be operable using the following screen readers: - NVDA - JAWS -Cauldron aims to provide accessible components by default with minimal configuration. \ No newline at end of file +Cauldron aims to provide accessible components by default with minimal configuration.