Skip to content

Commit

Permalink
refactor: [M3-8909] - Migrate EditableText to ui package (linode#…
Browse files Browse the repository at this point in the history
…11308)

* Move EditableText to `ui` package

* Added changeset: Migrate `EditableText` from `manager` to `ui` package

* Added changeset: Migrate `EditableText` from `manager` to `ui` package
  • Loading branch information
pmakode-akamai authored Nov 25, 2024
1 parent 31960f5 commit f2653ad
Show file tree
Hide file tree
Showing 9 changed files with 27 additions and 8 deletions.
5 changes: 5 additions & 0 deletions packages/manager/.changeset/pr-11308-removed-1732279956767.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@linode/manager": Removed
---

Migrate `EditableText` from `manager` to `ui` package ([#11308](https://github.com/linode/manager/pull/11308))
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import { H1Header } from '@linode/ui';
import { EditableText, H1Header } from '@linode/ui';
import { styled } from '@mui/material';

import { EditableText } from 'src/components/EditableText/EditableText';

export const StyledDiv = styled('div', { label: 'StyledDiv' })({
display: 'flex',
flexDirection: 'column',
Expand Down
5 changes: 5 additions & 0 deletions packages/ui/.changeset/pr-11308-added-1732280066633.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@linode/ui": Added
---

Migrate `EditableText` from `manager` to `ui` package ([#11308](https://github.com/linode/manager/pull/11308))
7 changes: 6 additions & 1 deletion packages/ui/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"plugins": [
"@typescript-eslint",
"react",
"react-hooks",
"sonarjs",
"prettier",
"@linode/eslint-plugin-cloud-manager"
Expand Down Expand Up @@ -56,7 +57,7 @@
"no-trailing-spaces": "warn",
"no-mixed-requires": "warn",
"object-shorthand": "warn",
// Perfectionist
// perfectionist
"perfectionist/sort-array-includes": "warn",
"perfectionist/sort-classes": "warn",
"perfectionist/sort-enums": "warn",
Expand Down Expand Up @@ -100,6 +101,10 @@
"react/self-closing-comp": "warn",
"react/jsx-no-useless-fragment": "warn",
"react/no-unescaped-entities": "warn",
"react/jsx-no-script-url": "error",
"react/prop-types": "off",
"react-hooks/exhaustive-deps": "warn",
"react-hooks/rules-of-hooks": "error",
// sonar
"sonarjs/cognitive-complexity": "off",
"sonarjs/no-duplicate-string": "warn",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { fireEvent } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import * as React from 'react';
import { describe, expect, it, vi } from 'vitest';

import { renderWithTheme } from 'src/utilities/testHelpers';

import { renderWithTheme } from '../../utilities/testHelpers';
import { EditableText } from './EditableText';

const props = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
import { Button, ClickAwayListener, H1Header, TextField } from '@linode/ui';
import Check from '@mui/icons-material/Check';
import Close from '@mui/icons-material/Close';
import Edit from '@mui/icons-material/Edit';
import * as React from 'react';
import { Link } from 'react-router-dom';
import { makeStyles } from 'tss-react/mui';

import type { TextFieldProps } from '@linode/ui';
import { Button } from '../Button';
import { ClickAwayListener } from '../ClickAwayListener';
import { H1Header } from '../H1Header';
import { TextField } from '../TextField';

import type { TextFieldProps } from '../TextField';
import type { Theme } from '@mui/material/styles';

const useStyles = makeStyles<void, 'editIcon' | 'icon'>()(
Expand Down
1 change: 1 addition & 0 deletions packages/ui/src/components/EditableText/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './EditableText';
1 change: 1 addition & 0 deletions packages/ui/src/components/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export * from './Checkbox';
export * from './CircleProgress';
export * from './ClickAwayListener';
export * from './Divider';
export * from './EditableText';
export * from './FormControl';
export * from './FormHelperText';
export * from './H1Header';
Expand Down

0 comments on commit f2653ad

Please sign in to comment.