SmallProvider

Declares a small size for an entire sub-tree of components.

Features

Avoids passing an small prop to many components.

#Import

import { SmallProvider, useSmallSize } from '@wpmedia/ads-system'

#Usage

Some of the ADS components have small variants, specifically the form elements. To ensure that all components that have a small size are displayed correctly, you need to wrap the sub-tree in a SmallProvider. It may feel like overkill if only one item needs the small size, but we found that often small sized items were grouped together. This also makes it easy if you have many nested components that all need to be aware of the small size.
Copyright 2021 Arc XP