Skip to content

Commit

Permalink
update md, add more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kmcfaul committed Sep 24, 2024
1 parent 512c880 commit 3b54b46
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
### tile-deprecated [(#)](https://github.com/patternfly/patternfly-react/pull/10821)
### tile-deprecated [(#10821)](https://github.com/patternfly/patternfly-react/pull/10821)

Tile has been deprecated. Running the fix flag will update your imports to our deprecated package, but we suggest using Card instead.
Tile has been deprecated. Running the fix flag will update your imports to our deprecated package, but we suggest using Card instead. There is a new Card example on our documentation showcasing how to set up a Card as a Tile.

#### Examples

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,45 @@ ruleTester.run('tile-deprecated', rule, {
},
],
},
{
code: `import { Tile as CustomTile } from '@patternfly/react-core';`,
output: `import {\n\tTile as CustomTile\n} from '@patternfly/react-core/deprecated';`,
errors: [
{
message: `Tile has been deprecated. Running the fix flag will update your imports to our deprecated package, but we suggest using Card instead.`,
type: 'ImportDeclaration',
},
],
},
{
code: `import { Tile } from '@patternfly/react-core/dist/esm/components/Tile/index.js';`,
output: `import {\n\tTile\n} from '@patternfly/react-core/dist/esm/deprecated/components/Tile/index.js';`,
errors: [
{
message: `Tile has been deprecated. Running the fix flag will update your imports to our deprecated package, but we suggest using Card instead.`,
type: 'ImportDeclaration',
},
],
},
{
code: `import { Tile } from '@patternfly/react-core/dist/js/components/Tile/index.js';`,
output: `import {\n\tTile\n} from '@patternfly/react-core/deprecated';`,
errors: [
{
message: `Tile has been deprecated. Running the fix flag will update your imports to our deprecated package, but we suggest using Card instead.`,
type: 'ImportDeclaration',
},
],
},
{
code: `import { Tile } from '@patternfly/react-core/dist/dynamic/components/Tile/index.js';`,
output: `import {\n\tTile\n} from '@patternfly/react-core/deprecated';`,
errors: [
{
message: `Tile has been deprecated. Running the fix flag will update your imports to our deprecated package, but we suggest using Card instead.`,
type: 'ImportDeclaration',
},
],
},
],
});

0 comments on commit 3b54b46

Please sign in to comment.