mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
09c60e2038
* UX: Icons: Remove IconCheck and fa-check * update jest snapshots * Update story * Remove dead CSS * Update ui/components/app/account-menu/account-menu.component.js Co-authored-by: George Marshall <george.marshall@consensys.net> * Update ui/components/app/dropdowns/network-dropdown.js Co-authored-by: George Marshall <george.marshall@consensys.net> * Update ui/components/app/modals/metametrics-opt-in-modal/metametrics-opt-in-modal.component.js Co-authored-by: George Marshall <george.marshall@consensys.net> * Update ui/pages/settings/networks-tab/networks-list-item/networks-list-item.js Co-authored-by: George Marshall <george.marshall@consensys.net> * Update ui/pages/settings/networks-tab/networks-list-item/networks-list-item.js Co-authored-by: George Marshall <george.marshall@consensys.net> * Update ui/pages/permissions-connect/redirect/permissions-redirect.component.js Co-authored-by: George Marshall <george.marshall@consensys.net> * Update ui/pages/send/send-content/add-recipient/domain-input.component.js Co-authored-by: George Marshall <george.marshall@consensys.net> * Update ui/pages/onboarding-flow/metametrics/metametrics.js Co-authored-by: George Marshall <george.marshall@consensys.net> * Update ui/components/app/modals/transaction-confirmed/transaction-confirmed.component.js Co-authored-by: George Marshall <george.marshall@consensys.net> * Update ui/components/app/modals/metametrics-opt-in-modal/metametrics-opt-in-modal.component.js Co-authored-by: George Marshall <george.marshall@consensys.net> * Fix jest snapshots * Update sizes of network andd account menu checks * Fix ICON_SIZES in account menu * Improvements * Use IconColor * Use IconColor * Lint * Update snapshots --------- Co-authored-by: George Marshall <george.marshall@consensys.net> |
||
---|---|---|
.. | ||
form-field.js | ||
form-field.stories.js | ||
index.js | ||
index.scss | ||
README.mdx |
import { Story, Canvas, ArgsTable } from '@storybook/addon-docs'; import FormField from '.'; # Form Field Various data fields available for forms and pages. <Canvas> <Story id="components-ui-formfield--default-story" /> </Canvas> ## Props <ArgsTable of={FormField} /> ### Title detail Show form fields with title detail on the left of the title <Canvas> <Story id="components-ui-formfield--form-field-with-title-detail" /> </Canvas> ### Error Show form fields with error state <Canvas> <Story id="components-ui-formfield--form-field-with-error" /> </Canvas> ### Custom Components Use the custom component props `TitleTextCustomComponent`, `TitleUnitCustomComponent` and `TooltipCustomComponent` to replace the default components. If these props exists they will replace their respective text props. The FormField is wrapped in a Box component that renders as a `<label />` element. To change the element type, use the `wrappingLabelProps` and polymorphic `as` prop. e.g `wrappingLabelProps={{ as: 'div' }}`. Make sure to provide your own `<label />` element combined with the `id` prop and `htmlFor` to ensure accessibility <Canvas> <Story id="components-ui-formfield--custom-components" /> </Canvas>