1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-25 03:20:23 +01:00

added deprecation message and comment in ui/check-box (#20226)

* added deprecation message and comment in ui/check-box

* Small adjustments to component name and story docs

---------

Co-authored-by: georgewrmarshall <george.marshall@consensys.net>
This commit is contained in:
Ashis Kumar Pradhan 2023-07-28 23:56:16 +05:30 committed by GitHub
parent 0c2519397d
commit 280fd5f7ef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 3 deletions

View File

@ -2,12 +2,12 @@ import { Story, Canvas, ArgsTable } from '@storybook/addon-docs';
import CheckBox from '.'; import CheckBox from '.';
# Checkbox # Check Box(Deprecated)
A small interactive box that can be toggled by the user to indicate an affirmative or negative choice. A small interactive box that can be toggled by the user to indicate an affirmative or negative choice.
<Canvas> <Canvas>
<Story id="components-ui-check-box--default-story" /> <Story id="components-ui-check-box-deprecated--default-story" />
</Canvas> </Canvas>
## Props ## Props

View File

@ -10,6 +10,15 @@ const CHECKBOX_STATE = {
export const { CHECKED, INDETERMINATE, UNCHECKED } = CHECKBOX_STATE; export const { CHECKED, INDETERMINATE, UNCHECKED } = CHECKBOX_STATE;
/**
* @deprecated The `<CheckBox />` component has been deprecated in favor of the new `<Checkbox>` component from the component-library.
* Please update your code to use the new `<Checkbox>` component instead, which can be found at ui/components/component-library/checkbox/checkbox.tsx.
* You can find documentation for the new Checkbox component in the MetaMask Storybook:
* {@link https://metamask.github.io/metamask-storybook/?path=/docs/components-componentlibrary-checkbox--docs}
* If you would like to help with the replacement of the old CheckBox component, please submit a pull request against this GitHub issue:
* {@link https://github.com/MetaMask/metamask-extension/issues/20163}
*/
const CheckBox = ({ const CheckBox = ({
className, className,
disabled, disabled,

View File

@ -15,7 +15,7 @@ const checkboxOptions = {
}; };
export default { export default {
title: 'Components/UI/Check Box', title: 'Components/UI/Check Box(Deprecated)',
component: CheckBox, component: CheckBox,
parameters: { parameters: {