-
Notifications
You must be signed in to change notification settings - Fork 148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor!: rebrand Chip
& ChipGroup
components
#1948
Conversation
|
✅ PR title follows Conventional Commits specification. |
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 24625ea:
|
Fixing types... |
31a13ad
to
351feb5
Compare
e514cc7
to
05ae2e5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@@ -22,8 +22,8 @@ const AnimatedChip = ({ | |||
}: Omit<AnimatedChipProps, 'theme'>): React.ReactElement => { | |||
const { theme } = useTheme(); | |||
|
|||
const easing = getIn(theme, chipMotionTokens.easing); | |||
const duration = getIn(theme, chipMotionTokens.duration); | |||
const easing = getIn(theme.motion, chipMotionTokens.easing); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
was this broken earlier?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, just refactored types as per #1948 (comment)
@@ -39,22 +39,6 @@ describe('<Chip />', () => { | |||
expect(getByRole('radio', { name: 'Mango' })).toBeInTheDocument(); | |||
}); | |||
|
|||
it('should render chip with intent', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this shall ideally fail right? instead of removing this test maybe check for failure?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TS will throw an error. The component won't throw any runtime error because we don't have any runtime checks. We have removed intent/variant tests in other components too.
be1d0e1
to
24625ea
Compare
intent
prop.intent="none|positive|negative"
->color="primary|positive|negative"
color="default"
tocolor="primary"
.