1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00
metamask-extension/ui/components/ui/actionable-message
Ariella Vu 5e3770eb13
Replace ActionableMessage components with BannerAlerts in SIWE Sign-in with Ethereum page (#18207)
* siwe: re-enable warning UI for mismatched domains
- unblocks mismatched domain support
- we may re-add error handling here #18184
- reverts logic from #16616

* siwe: fix mismatch domain warning msg UI

* lint: rm whitespace EOL

* siwe: rm unit test

* lint: fix whitespace

* Icon: support .mm-icon
- apply to SIWE actionable-message
- .mm-icon is a <span>

* lint: fix newline

* Revert "siwe: rm unit test"

This reverts commit c80a4a2e661609c46c76d1e43e05909b6db3f0f5.

* ActionableMessage: add deprecation

* siwe: replace actionable-msg w/ banner-alert

* ActionableMessage: add param for lint

* revert .mm_icon ActionableMessage support

* siwe: create tests

* siwe: fix typo in tests

* siwe: fix - do not allow nested <p> elements

* Update ui/components/app/signature-request-siwe/signature-request-siwe.js

Co-authored-by: George Marshall <george.marshall@consensys.net>

* Update ui/components/app/signature-request-siwe/signature-request-siwe.js

Co-authored-by: George Marshall <george.marshall@consensys.net>

* eslint fix

---------

Co-authored-by: legobeat <109787230+legobeat@users.noreply.github.com>
Co-authored-by: George Marshall <george.marshall@consensys.net>
2023-03-21 09:49:04 -07:00
..
__snapshots__ Add icon to actionable message component (#11409) 2021-07-02 14:07:56 -05:00
actionable-message.js Replace ActionableMessage components with BannerAlerts in SIWE Sign-in with Ethereum page (#18207) 2023-03-21 09:49:04 -07:00
actionable-message.stories.js feature: migrate design-system.ts (#17518) 2023-02-02 20:15:26 +00:00
actionable-message.test.js Confirm transaction page - onchain failure handling (#12743) 2021-11-24 22:32:53 +05:30
index.js Add icon to actionable message component (#11409) 2021-07-02 14:07:56 -05:00
index.scss Dark Mode: Fix Actionable Messages (#14361) 2022-04-05 13:51:05 -05:00
README.mdx Added storybook check to CI (#17092) 2023-01-21 00:57:46 +05:30

import { Story, Canvas, ArgsTable } from '@storybook/addon-docs';

import ActionableMessage from '.';

# Actionable Message

Popup component that give the user information. Actionable Message component can generate a tooltip and a maximum of two action buttons.

<Canvas>
  <Story id="components-ui-actionablemessage--default-story" />
</Canvas>

## Props

<ArgsTable of={ActionableMessage} />

### One Action

Add actionable message component with one button

<Canvas>
  <Story id="components-ui-actionablemessage--one-action" />
</Canvas>

### Two Actions

Add actionable message component with two buttons

<Canvas>
  <Story id="components-ui-actionablemessage--two-actions" />
</Canvas>

### Left Aligned

Align actionable message component's text to left

<Canvas>
  <Story id="components-ui-actionablemessage--left-aligned" />
</Canvas>

### With Icon

Add tooltip icon to the left of the component

<Canvas>
  <Story id="components-ui-actionablemessage--with-icon" />
</Canvas>