Skip to content

Commit

Permalink
Add comment explaining styling
Browse files Browse the repository at this point in the history
  • Loading branch information
jen-huang committed Jul 27, 2020
1 parent dede0b9 commit 6fb3057
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,15 @@ const AgentConfigWrapper = styled(EuiFormRow)`
}
`;

// Custom styling for drop down list items due to:
// 1) the max-width and overflow properties is added to prevent long config
// names/descriptions from overflowing the flex items
// 2) max-width is built from the grow property on the flex items because the value
// changes based on if Fleet is enabled/setup or not
const AgentConfigNameColumn = styled(EuiFlexItem)`
max-width: ${(props) => `${((props.grow as number) / 9) * 100}%`};
overflow: hidden;
`;

const AgentConfigDescriptionColumn = styled(EuiFlexItem)`
max-width: ${(props) => `${((props.grow as number) / 9) * 100}%`};
overflow: hidden;
Expand Down

0 comments on commit 6fb3057

Please sign in to comment.