diff --git a/src/core/client/stream/components/Comment/__snapshots__/TopBar.spec.tsx.snap b/src/core/client/stream/components/Comment/__snapshots__/TopBar.spec.tsx.snap index 02f3c7726..9253404bd 100644 --- a/src/core/client/stream/components/Comment/__snapshots__/TopBar.spec.tsx.snap +++ b/src/core/client/stream/components/Comment/__snapshots__/TopBar.spec.tsx.snap @@ -2,7 +2,7 @@ exports[`renders correctly on big screens 1`] = `
Hello World diff --git a/src/core/client/stream/test/__snapshots__/loadMore.spec.tsx.snap b/src/core/client/stream/test/__snapshots__/loadMore.spec.tsx.snap index 065e376b5..688e88d38 100644 --- a/src/core/client/stream/test/__snapshots__/loadMore.spec.tsx.snap +++ b/src/core/client/stream/test/__snapshots__/loadMore.spec.tsx.snap @@ -43,12 +43,12 @@ exports[`loads more comments 1`] = `
diff --git a/src/core/client/stream/test/__snapshots__/renderStream.spec.tsx.snap b/src/core/client/stream/test/__snapshots__/renderStream.spec.tsx.snap index 0290e7f21..89e42ee20 100644 --- a/src/core/client/stream/test/__snapshots__/renderStream.spec.tsx.snap +++ b/src/core/client/stream/test/__snapshots__/renderStream.spec.tsx.snap @@ -43,12 +43,12 @@ exports[`renders comment stream 1`] = `
@@ -174,12 +174,12 @@ exports[`show all replies 1`] = `
diff --git a/src/core/client/ui/components/Flex/Flex.tsx b/src/core/client/ui/components/Flex/Flex.tsx index 240e13f9e..4a5abbc08 100644 --- a/src/core/client/ui/components/Flex/Flex.tsx +++ b/src/core/client/ui/components/Flex/Flex.tsx @@ -47,8 +47,9 @@ const Flex: StatelessComponent = props => { } = props; let alignItemsWithDefault = alignItems; - if (!direction || !direction.startsWith("column")) { - alignItemsWithDefault = "center"; + if (!alignItems) { + alignItemsWithDefault = + direction && direction.startsWith("column") ? "flex-start" : "center"; } const classObject: Record = { diff --git a/src/core/client/ui/components/ToggleShow/ToggleShow.spec.tsx b/src/core/client/ui/components/ToggleShow/ToggleShow.spec.tsx index d81075019..bdeb29df6 100644 --- a/src/core/client/ui/components/ToggleShow/ToggleShow.spec.tsx +++ b/src/core/client/ui/components/ToggleShow/ToggleShow.spec.tsx @@ -9,7 +9,7 @@ it("renders correctly", () => { {({ toggleShow, show }) => (
{show &&
SHOW ME
} - +
)} diff --git a/src/core/client/ui/components/ToggleShow/ToogleShow.mdx b/src/core/client/ui/components/ToggleShow/ToogleShow.mdx index 4fc58d41e..05ab31e56 100644 --- a/src/core/client/ui/components/ToggleShow/ToogleShow.mdx +++ b/src/core/client/ui/components/ToggleShow/ToogleShow.mdx @@ -5,18 +5,22 @@ menu: UI Kit import { Playground } from 'docz' import ToggleShow from './ToggleShow' +import Button from '../Button' +import Flex from '../Flex' # ToggleShow -A Component that provides a render function to display nodes +A render props component to manage visible state. ## Basic usage {({ toggleShow, show }) => ( -
- {show &&
SHOW ME
} - -
+ + {show &&
Hello World!
} + +
)}
diff --git a/src/core/client/ui/components/ToggleShow/__snapshots__/ToggleShow.spec.tsx.snap b/src/core/client/ui/components/ToggleShow/__snapshots__/ToggleShow.spec.tsx.snap index 323274282..b4754816e 100644 --- a/src/core/client/ui/components/ToggleShow/__snapshots__/ToggleShow.spec.tsx.snap +++ b/src/core/client/ui/components/ToggleShow/__snapshots__/ToggleShow.spec.tsx.snap @@ -8,7 +8,7 @@ exports[`renders correctly 1`] = `
`;