-
-
Notifications
You must be signed in to change notification settings - Fork 149
Issue_528_style_table_column_width #1145
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
base: main
Are you sure you want to change the base?
Conversation
}: { | ||
value: string; | ||
to?: string; | ||
style?: React.CSSProperties; |
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.
in my opinion it is not a good idea to pass style to UI components , it is much better approach to have that configured by props
in this case we can have a single prop called wordBreak
or something that add those two properties
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.
I used it due to Table.styled.ts has more specific selector for a
tag styles white-space: nowrap;
What do you think about using !important
Smth like
const NavLinkStyled = styled(NavLink)<{ $wordBreak?: boolean }>`
${({ $wordBreak }) => {
if ($wordBreak) {
return css`
word-break: break-word !important;
white-space: pre-wrap !important;
`;
}
}}
`;
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.
Or that will work too
const NavLinkStyled = styled(NavLink)<{ $wordBreak?: boolean }>`
&& {
${({ $wordBreak }) =>
$wordBreak &&
css`
word-break: break-word;
white-space: pre-wrap;
`}
}
`;
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.
let's go with the second one
What changes did you make? (Give an overview)
Added new shared component BreakableTextCell that allows to break the text of table column by separators or by letter
Set column width for some table ( Dashboards, Brokers, Topics etc)
Fixed main header transparency bug
Is there anything you'd like reviewers to focus on?
How Has This Been Tested? (put an "x" (case-sensitive!) next to an item)
Checklist (put an "x" (case-sensitive!) next to all the items, otherwise the build will fail)
Check out Contributing and Code of Conduct
A picture of a cute animal (not mandatory but encouraged)