@component-controls/addon-stats v4.0.3
Table of contents
In action
Overview
Addon to collect and display statistics for component-controls
Getting Started
Install
yarn add @component-controls/addon-stats --dev
Usage
import { ComponentUsage, AttributeUsage, ComponentUsageList, AttributesUsageList } from '@component-controls/addon-stats';
## Attributes usage summary
Attributes usage - how many times an attribute is being set on a component, and on which component it is being set
<AttributeUsage />
## Components usage details
How many times a component is being used from another component, with a list of the components using it
<ComponentUsageList />
## Attributes usage details
How many times an attribute is being used on a component, with a list of those components
<AttributesUsageList />
API
AttributeUsage
react component
Table of all the used attributes, with their components
defined in @component-controls/addon-stats/plugins/addon-stats/src/ui/AttributeUsage/AttributeUsage.tsx
properties
Name | Type | Parent | Default | Description |
---|---|---|---|---|
filter | function (...2 propertiesdoc *[string ]: any title *: string type : "story" | "blog" | "page" | "tags" | "author" | string route : string date : string dateModified : string status : "draft" | "published" tags : string []keywords : string []description : string | JSX.Element image : string author : string order : number menu : string template bind *: source *: id *: storyName *: rawId *: doc *: storyFn *: description *: loc *: subtitle *: dynamic *: dynamicId *: component *: subcomponents *: smartControls *: decorators *: plugins *: category *: controls *: stories : string []source : string fileName : string package : string testFiles : string []testCoverage : string []testData : string renderFn : function (props *: ) => any data [string ]: componentsLookup [string ]: string MDXPage : any isMDXComponent : boolean parameters : any component : string | Record <string , unknown > | ElementType <Props >subcomponents : Record <string , (string , Record <string , unknown >, ElementType <Props >)>controls [string ]: ComponentControl <P >smartControls smart *: include *: exclude *: decorators : StoryRenderFn []plugins : any category : string navSidebar : boolean contextSidebar : boolean fullPage : boolean component *name *: string importedName : "default" | "namespace" | string from : string request : string fileName : string propsInfoFile : string loc start *: end *: package : string source : string info displayName *: description *: props *: externalDependencies [string ]: (Omit <ImportType , "from" >)[]localDependencies [string ]: (Omit <ImportType , "from" >)[]jsx : JSXNode []fileInfo dateCreated *: dateModified *: commits *: sloc *: jest results *: coverage *: ) => boolean | AttributeUsageProps | stats filter callback function | |
linkAttributes | boolean | AttributeUsageProps | true | |
title | string | BlockContainerOwnProps | optional section title for the block. | |
description | string | BlockContainerOwnProps | optional markdown description. | |
id | string | BlockContainerOwnProps | optional id to be used for the block if no id is provided, one will be calculated automatically from the title. | |
collapsible | boolean | BlockContainerOwnProps | if false, will nothave a collapsible frame. | |
data-testid | string | BlockContainerOwnProps | testing id | |
plain | boolean | BlockContainerOwnProps | inner container variant or plain | |
slot | string | undefined | HTMLAttributes | ||
style | CSSProperties | undefined | HTMLAttributes | ||
key | Key | null | undefined | Attributes | ||
sx | ThemeUICSSObject | ThemeDerivedStyles | Attributes | The ThemeUIStyleObject extends [style props](https://emotion.sh/docs/object-styles) such that properties that are part of the Theme will be transformed to their corresponding values. Other valid CSS properties are also allowed. | |
defaultChecked | boolean | undefined | HTMLAttributes | ||
defaultValue | string | number | ReadonlyArray <string > | undefined | HTMLAttributes | ||
suppressContentEditableWarning | boolean | undefined |
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago