-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(TMC-2505): integrate status dot to tabs component
- Loading branch information
1 parent
f59e03c
commit 06ae686
Showing
25 changed files
with
214 additions
and
189 deletions.
There are no files selected for viewing
12 changes: 0 additions & 12 deletions
12
packages/design-system/src/components/StatusBubble/Primitive/StatusBubblePrimitive.test.tsx
This file was deleted.
Oops, something went wrong.
27 changes: 0 additions & 27 deletions
27
packages/design-system/src/components/StatusBubble/StatusBubble.tsx
This file was deleted.
Oops, something went wrong.
15 changes: 0 additions & 15 deletions
15
packages/design-system/src/components/StatusBubble/index.ts
This file was deleted.
Oops, something went wrong.
16 changes: 0 additions & 16 deletions
16
packages/design-system/src/components/StatusBubble/variations/StatusBubbleBeta.tsx
This file was deleted.
Oops, something went wrong.
16 changes: 0 additions & 16 deletions
16
packages/design-system/src/components/StatusBubble/variations/StatusBubbleError.tsx
This file was deleted.
Oops, something went wrong.
18 changes: 0 additions & 18 deletions
18
packages/design-system/src/components/StatusBubble/variations/StatusBubbleInformation.tsx
This file was deleted.
Oops, something went wrong.
18 changes: 0 additions & 18 deletions
18
packages/design-system/src/components/StatusBubble/variations/StatusBubbleSuccess.tsx
This file was deleted.
Oops, something went wrong.
18 changes: 0 additions & 18 deletions
18
packages/design-system/src/components/StatusBubble/variations/StatusBubbleWarning.tsx
This file was deleted.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
...imitive/StatusBubblePrimitive.module.scss → .../Primitive/StatusDotPrimitive.module.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
packages/design-system/src/components/StatusDot/Primitive/StatusDotPrimitive.test.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { describe, expect, it } from '@jest/globals'; | ||
import { render, screen } from '@testing-library/react'; | ||
|
||
import StatusDot, { variants } from './StatusDotPrimitive'; | ||
|
||
describe('StatusDot', (): void => { | ||
it('Should render', (): void => { | ||
render(<StatusDot variant={variants.success} data-testid="my-status-dot-component" />); | ||
|
||
expect(screen.getByTestId('my-status-dot-component')).toBeVisible(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
packages/design-system/src/components/StatusDot/StatusDot.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { forwardRef, Ref } from 'react'; | ||
|
||
import { StatusDotProps, variants } from './Primitive/StatusDotPrimitive'; | ||
import StatusDotBeta from './variations/StatusDotBeta'; | ||
import StatusDotError from './variations/StatusDotError'; | ||
import StatusDotInformation from './variations/StatusDotInformation'; | ||
import StatusDotSuccess from './variations/StatusDotSuccess'; | ||
import StatusDotWarning from './variations/StatusDotWarning'; | ||
|
||
const StatusBubble = forwardRef((props: StatusDotProps, ref: Ref<HTMLSpanElement>) => { | ||
switch (props.variant) { | ||
case variants.beta: | ||
return <StatusDotBeta {...props} ref={ref} />; | ||
case variants.error: | ||
return <StatusDotError {...props} ref={ref} />; | ||
case variants.information: | ||
return <StatusDotInformation {...props} ref={ref} />; | ||
case variants.success: | ||
return <StatusDotSuccess {...props} ref={ref} />; | ||
case variants.warning: | ||
return <StatusDotWarning {...props} ref={ref} />; | ||
default: | ||
return null; | ||
} | ||
}); | ||
|
||
export default StatusBubble; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import StatusDot from './StatusDot'; | ||
import StatusDotBeta from './variations/StatusDotBeta'; | ||
import StatusDotError from './variations/StatusDotError'; | ||
import StatusDotInformation from './variations/StatusDotInformation'; | ||
import StatusDotSuccess from './variations/StatusDotSuccess'; | ||
import StatusDotWarning from './variations/StatusDotWarning'; | ||
|
||
export { | ||
StatusDot, | ||
StatusDotBeta, | ||
StatusDotError, | ||
StatusDotInformation, | ||
StatusDotSuccess, | ||
StatusDotWarning, | ||
}; |
13 changes: 13 additions & 0 deletions
13
packages/design-system/src/components/StatusDot/variations/StatusDotBeta.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { forwardRef, Ref } from 'react'; | ||
|
||
import StatusDotPrimitive, { StatusDotProps, variants } from '../Primitive/StatusDotPrimitive'; | ||
|
||
export type StatusDotBetaProps = Omit<StatusDotProps, 'variant'>; | ||
|
||
const StatusDotBeta = forwardRef((props: StatusDotBetaProps, ref: Ref<HTMLSpanElement>) => { | ||
return <StatusDotPrimitive variant={variants.beta} ref={ref} {...props} />; | ||
}); | ||
|
||
StatusDotBeta.displayName = 'StatusDotBeta'; | ||
|
||
export default StatusDotBeta; |
13 changes: 13 additions & 0 deletions
13
packages/design-system/src/components/StatusDot/variations/StatusDotError.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { forwardRef, Ref } from 'react'; | ||
|
||
import StatusDotPrimitive, { StatusDotProps, variants } from '../Primitive/StatusDotPrimitive'; | ||
|
||
export type StatusDotErrorProps = Omit<StatusDotProps, 'variant'>; | ||
|
||
const StatusDotError = forwardRef((props: StatusDotErrorProps, ref: Ref<HTMLSpanElement>) => { | ||
return <StatusDotPrimitive variant={variants.error} ref={ref} {...props} />; | ||
}); | ||
|
||
StatusDotError.displayName = 'StatusDotError'; | ||
|
||
export default StatusDotError; |
15 changes: 15 additions & 0 deletions
15
packages/design-system/src/components/StatusDot/variations/StatusDotInformation.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { forwardRef, Ref } from 'react'; | ||
|
||
import StatusDotPrimitive, { StatusDotProps, variants } from '../Primitive/StatusDotPrimitive'; | ||
|
||
export type StatusDotInformationProps = Omit<StatusDotProps, 'variant'>; | ||
|
||
const StatusDotInformation = forwardRef( | ||
(props: StatusDotInformationProps, ref: Ref<HTMLSpanElement>) => { | ||
return <StatusDotPrimitive variant={variants.information} ref={ref} {...props} />; | ||
}, | ||
); | ||
|
||
StatusDotInformation.displayName = 'StatusDotInformation'; | ||
|
||
export default StatusDotInformation; |
13 changes: 13 additions & 0 deletions
13
packages/design-system/src/components/StatusDot/variations/StatusDotSuccess.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { forwardRef, Ref } from 'react'; | ||
|
||
import StatusDotPrimitive, { StatusDotProps, variants } from '../Primitive/StatusDotPrimitive'; | ||
|
||
export type StatusDotSuccessProps = Omit<StatusDotProps, 'variant'>; | ||
|
||
const StatusDotSuccess = forwardRef((props: StatusDotSuccessProps, ref: Ref<HTMLSpanElement>) => { | ||
return <StatusDotPrimitive variant={variants.success} ref={ref} {...props} />; | ||
}); | ||
|
||
StatusDotSuccess.displayName = 'StatusDotSuccess'; | ||
|
||
export default StatusDotSuccess; |
13 changes: 13 additions & 0 deletions
13
packages/design-system/src/components/StatusDot/variations/StatusDotWarning.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { forwardRef, Ref } from 'react'; | ||
|
||
import StatusDotPrimitive, { StatusDotProps, variants } from '../Primitive/StatusDotPrimitive'; | ||
|
||
export type StatusDotWarningProps = Omit<StatusDotProps, 'variant'>; | ||
|
||
const StatusDotWarning = forwardRef((props: StatusDotWarningProps, ref: Ref<HTMLSpanElement>) => { | ||
return <StatusDotPrimitive variant={variants.warning} ref={ref} {...props} />; | ||
}); | ||
|
||
StatusDotWarning.displayName = 'StatusDotWarning'; | ||
|
||
export default StatusDotWarning; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 0 additions & 39 deletions
39
packages/design-system/src/stories/feedback/StatusBubble.stories.tsx
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.