1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-22 01:47:00 +01:00

Moving RESIZE constant to textarea component folder (#19240)

* Moving RESIZE constant

* fixinf linting errors
This commit is contained in:
Dhruv 2023-05-23 23:10:34 +05:30 committed by GitHub
parent 15598f2a23
commit 49b8dcb25d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 15 additions and 18 deletions

View File

@ -0,0 +1,8 @@
export const RESIZE = {
NONE: 'none',
BOTH: 'both',
HORIZONTAL: 'horizontal',
VERTICAL: 'vertical',
INITIAL: 'initial',
INHERIT: 'inherit',
};

View File

@ -4,15 +4,14 @@ import PropTypes from 'prop-types';
import classnames from 'classnames';
import {
RESIZE,
BorderStyle,
BLOCK_SIZES,
BlockSize,
Size,
BorderColor,
BackgroundColor,
} from '../../../helpers/constants/design-system';
import Box from '../box';
import { RESIZE } from './textarea.constants';
const TextArea = ({
className,
@ -40,7 +39,7 @@ const TextArea = ({
borderRadius={Size.SM}
borderStyle={BorderStyle.solid}
padding={4}
width={BLOCK_SIZES.FULL}
width={BlockSize.Full}
{...boxProps}
>
{(boxClassName) => (

View File

@ -2,14 +2,13 @@ import React from 'react';
import { useArgs } from '@storybook/client-api';
import {
RESIZE,
BorderStyle,
BLOCK_SIZES,
BlockSize,
BorderRadius,
BorderColor,
Size,
} from '../../../helpers/constants/design-system';
import { RESIZE } from './textarea.constants';
import README from './README.mdx';
import Textarea from '.';
@ -115,6 +114,6 @@ Scrollable.args = {
borderRadius: BorderRadius.none,
borderStyle: BorderStyle.none,
padding: [2, 4],
width: BLOCK_SIZES.FULL,
width: BlockSize.Full,
},
};

View File

@ -3,9 +3,9 @@ import { render, fireEvent } from '@testing-library/react';
import {
BorderColor,
BorderStyle,
RESIZE,
Size,
} from '../../../helpers/constants/design-system';
import { RESIZE } from './textarea.constants';
import TextArea from '.';
describe('TextArea', () => {

View File

@ -497,13 +497,4 @@ export const SEVERITIES = {
SUCCESS: 'success',
};
export const RESIZE = {
NONE: 'none',
BOTH: 'both',
HORIZONTAL: 'horizontal',
VERTICAL: 'vertical',
INITIAL: 'initial',
INHERIT: 'inherit',
};
export const BREAKPOINTS = ['base', 'sm', 'md', 'lg'];