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

Copiable text component - Closes #6224 #6275

Merged
merged 4 commits into from Mar 25, 2021

Conversation

ishantiw
Copy link
Member

What was the problem?

This PR resolves #6224

How was it solved?

  • Use Text component
  • Use Icon component
  • copy to clipboard handling
  • setTimeout to original text

How was it tested?

npm run start:web

@ishantiw ishantiw self-assigned this Mar 24, 2021

interface Props {
name: string;
size?: 's' | 'm' | 'l' | 'xl';
Copy link
Member

Choose a reason for hiding this comment

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

these property i think you can export Props from Text and reference rather than redefining

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes it should be exported from Text/index.tsx and then union those types here.

}

.clickableRow {
float: left;
Copy link
Member

Choose a reason for hiding this comment

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

you can use flex here

Copy link
Member Author

Choose a reason for hiding this comment

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

when using flex, Text and Icon components don't align side by side and icon goes to the next line

Copy link
Member

Choose a reason for hiding this comment

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

the flex needs to be added to the container


interface Props {
name: string;
size?: 's' | 'm' | 'l' | 'xl';
Copy link
Contributor

Choose a reason for hiding this comment

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

Yes it should be exported from Text/index.tsx and then union those types here.

♻️  Hide copy icon on copied
♻️  Clear timeout
@shuse2 shuse2 merged commit c1af4fa into feature/6216-add_dashboard-plugin Mar 25, 2021
@shuse2 shuse2 deleted the 6224_copiable_text branch March 25, 2021 12:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants