Skip to content

Commit

Permalink
add eslint rule and deprecate className in box
Browse files Browse the repository at this point in the history
  • Loading branch information
marcoskolodny committed Oct 3, 2024
1 parent 390db17 commit 6dd3540
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
7 changes: 5 additions & 2 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,11 @@ overrides:
rules:
no-restricted-imports:
- error
- name: '@vanilla-extract/css'
message: This package should only be imported in css files
- patterns:
- group:
- '@vanilla-extract/css'
- '**/sprinkles.css'
message: This package should only be imported in css files
rules:
import/extensions:
- error
Expand Down
4 changes: 4 additions & 0 deletions src/box.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ type Props = {
paddingRight?: ByBreakpoint<PadSize>;
as?: React.ComponentType<any> | string;
children?: React.ReactNode;
/**
* @deprecated this component is meant to be used only to add padding.
* Consider using a div (or similar) instead if you need to add extra styles
*/
className?: string;
role?: string;
/** "data-" prefix is automatically added. For example, use "testid" instead of "data-testid" */
Expand Down

0 comments on commit 6dd3540

Please sign in to comment.