diff --git a/CHANGELOG.md b/CHANGELOG.md index ebe78f0439..828a313fa8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,6 +30,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Fixed active state of sub navigation items, which are using activeWhenMatch ([#1199](https://github.com/scm-manager/scm-manager/pull/1199)) - Handles repositories in custom directories correctly in migration from 1.x ([#1201](https://github.com/scm-manager/scm-manager/pull/1201)) - Usage of short git commit ids in changeset urls ([#1200](https://github.com/scm-manager/scm-manager/pull/1200)) +- Fixes linebreaks in multiline tooltip ([#1207](https://github.com/scm-manager/scm-manager/pull/1207)) ## [2.0.0] - 2020-06-04 ### Added diff --git a/scm-ui/ui-components/src/Tooltip.stories.tsx b/scm-ui/ui-components/src/Tooltip.stories.tsx index f6f4cbad5b..13cfb93228 100644 --- a/scm-ui/ui-components/src/Tooltip.stories.tsx +++ b/scm-ui/ui-components/src/Tooltip.stories.tsx @@ -32,24 +32,38 @@ import Button from "./buttons/Button"; const Wrapper = styled.div` margin: 2rem; - max-width: 400px; + width: 100%; `; const Spacing = styled.div` padding: 2em 6em; + width: 50%; + margin: 0 auto; `; const positions = ["right", "top", "left", "bottom"]; const message = "Heart of Gold"; +const mutltiline = `Characters: + +- Arthur Dent +- Ford Prefect +- Zaphod Beeblebrox +- Marvin the Paranoid Android +- Trillian +- Slartibartfast`; + +const shortMultiline = `* a +* b +* c`; + const RoutingDecorator = (story: () => ReactNode) => {story()}; storiesOf("Tooltip", module) .addDecorator(RoutingDecorator) - .addDecorator(storyFn => {storyFn()}) .add("Default", () => ( -
+ {positions.map(position => ( @@ -57,5 +71,27 @@ storiesOf("Tooltip", module) ))} -
+ + )) + .add("Multiline", () => ( + + {positions.map(position => ( + + + + right - - -
+ + +
+
+ - - + top - -
-
+ + +
+
+ - - + left - -
-
+ + +
+
+ - - + bottom - -
+ + + + + +`; + +exports[`Storyshots Tooltip Multiline 1`] = ` +
+
+ + + + +
+
+ + + + +
+
+ + + + +
+
+ + + + +
+
+`; + +exports[`Storyshots Tooltip Short Multiline 1`] = ` +
+
+ + + + +
+
+ + + + +
+
+ + + + +
+
+ + + +
`;