You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Respect `hidden` attribute on all components
- Updated #2450
- Did not fix tabs as this is fixed in
#2944
---------
Co-authored-by: Barsnes <[email protected]>
To make it easier to contribute and for ourselves to have a consistent codebase, we should document some of our coding conventions.
forwardRef
(unless exposing a Context)React.{TagName}HTMLAttributes<HTML{TagName}Element>
className
should always work as expected)successText
anderrorText
at the same time)useId()
when if needed for accessibility@media(hover: hover) and (pointer: fine)
around:hover
to avoid:hover
on touch-devicesisHidden
):focus-visible
to style focus stateReactNode
type for props instead of string (unless it has to be string)useEffect
if manipulating DOM directly to ensure server compatibilityComponent
as name of the outermost HTML element rendering the componentComponent.Context
as a wrapper (andComponent.Trigger
) if a component has context and triggerContext
as name of internal, non-exposed ContextReact.*
Component.List
when listing multiple itemsbackground
and notbackground-color
in tokens to allow setting advanced values likelinear-gradient
&:not([hidden]) { display: }
arounddisplay
to supporthidden
attributeThe text was updated successfully, but these errors were encountered: