Skip to content
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

feat(tags): Adds border customizability to <Tag/> #70269

Merged
merged 3 commits into from
May 6, 2024

Conversation

MichaelSun48
Copy link
Member

This PR adds a borderStyle prop to the <Tag/> component. It is set to solid by default, since that is what was the only option before.

This will be needed in upcoming changes to the Assignee dropdown trigger on the Issue details page, detailed here

@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label May 3, 2024
@@ -18,6 +18,7 @@ import type {Color} from 'sentry/utils/theme';
import theme from 'sentry/utils/theme';

export interface TagProps extends React.HTMLAttributes<HTMLSpanElement> {
borderStyle?: 'solid' | 'dashed' | 'dotted' | 'double' | 'none';
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are more border styles than this, but I just added the 2d ones that I thought were relevant - feel free to correct me if there's a better way to do this

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed double because it doesn't appear to do anything.
Removed none because it just becomes text at that point

@MichaelSun48
Copy link
Member Author

Is there a good way to write a test for this? I couldn't get .toHaveStyle('border: hashed'), for example, to work.

Copy link
Member

@ryan953 ryan953 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MichaelSun48
Copy link
Member Author

Updated stories page:
image

@MichaelSun48 MichaelSun48 merged commit d6f6552 into master May 6, 2024
42 checks passed
@MichaelSun48 MichaelSun48 deleted the msun/addBorderStylePropToTag branch May 6, 2024 21:42
@github-actions github-actions bot locked and limited conversation to collaborators May 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Scope: Frontend Automatically applied to PRs that change frontend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants