mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-22 17:33:23 +01:00
Moving RESIZE
constant to textarea component folder (#19240)
* Moving RESIZE constant * fixinf linting errors
This commit is contained in:
parent
15598f2a23
commit
49b8dcb25d
8
ui/components/ui/textarea/textarea.constants.js
Normal file
8
ui/components/ui/textarea/textarea.constants.js
Normal file
@ -0,0 +1,8 @@
|
||||
export const RESIZE = {
|
||||
NONE: 'none',
|
||||
BOTH: 'both',
|
||||
HORIZONTAL: 'horizontal',
|
||||
VERTICAL: 'vertical',
|
||||
INITIAL: 'initial',
|
||||
INHERIT: 'inherit',
|
||||
};
|
@ -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) => (
|
||||
|
@ -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,
|
||||
},
|
||||
};
|
||||
|
@ -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', () => {
|
||||
|
@ -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'];
|
||||
|
Loading…
Reference in New Issue
Block a user