`
border: ${({ fullWidth, theme }) =>
fullWidth ? "none" : `1px solid ${theme.palette.divider}`};
border-top: 1px solid ${({ theme }) => theme.palette.divider};
+ border-bottom: 1px solid ${({ theme }) => theme.palette.divider};
border-radius: ${({ fullWidth, theme }) =>
fullWidth ? "none" : `${theme.radius}px`};
`;
diff --git a/src/components/Divider/Divider.stories.mdx b/src/components/Divider/Divider.stories.mdx
new file mode 100644
index 000000000..10966d1a5
--- /dev/null
+++ b/src/components/Divider/Divider.stories.mdx
@@ -0,0 +1,61 @@
+import { Meta, Story, ArgsTable, Canvas } from "@storybook/addon-docs/blocks";
+import Divider from "./Divider";
+
+
+
+# Divider
+
+`
` is wrapper of `
` tag that separate content into clear groups.
+
+
+
+## Samples
+
+### Normal
+
+
+
+### With space
+
+It can define margin and padding like [`
`](/?path=/docs/components-layout-spacer--example).
+
+
+
+### Override Color
+
+
+
+### vertical
+
+
diff --git a/src/components/Divider/Divider.stories.tsx b/src/components/Divider/Divider.stories.tsx
deleted file mode 100644
index 03dbf8f21..000000000
--- a/src/components/Divider/Divider.stories.tsx
+++ /dev/null
@@ -1,67 +0,0 @@
-import * as React from "react";
-import styled from "styled-components";
-import Divider from ".";
-import Typography from "../Typography";
-import Spacer from "../Spacer";
-import Flex from "../Flex";
-
-const Container = styled.div`
- padding: ${({ theme }) => theme.spacing * 3}px;
- background-color: ${({ theme }) => theme.palette.background.dark};
-`;
-
-const RowContainer = styled.div`
- margin: ${({ theme }) => theme.spacing * 3}px;
- padding: ${({ theme }) => theme.spacing * 3}px 0;
- background-color: ${({ theme }) => theme.palette.background.default};
-`;
-
-export default {
- title: "Components/Data Display/Divider",
- component: Divider,
- parameters: {
- docs: { page: null },
- },
-};
-
-export const Overview = () => (
-
-
- Normal
-
-
-
-
-
- With Space
-
-
-
-
-
- *It can define margin and padding like "Spacer" component.
-
-
-
-
- Override Color
-
-
-
-
-
-
-
-
-
- Vertical
-
-
-
-
-
-
-
-
-
-);
diff --git a/src/components/FixedPanel/FixedPanel.stories.mdx b/src/components/FixedPanel/FixedPanel.stories.mdx
index 564e2f216..ffefacb4d 100644
--- a/src/components/FixedPanel/FixedPanel.stories.mdx
+++ b/src/components/FixedPanel/FixedPanel.stories.mdx
@@ -35,13 +35,13 @@ Usage example is included in ”Canvas” Tab at header.
React.useEffect(() => {
if (!buttonContainerRef.current) return;
const observer = new IntersectionObserver((entries) => {
- setIsOpen(!entries[0].isIntersecting);
+ if (args.isOpen) setIsOpen(!entries[0].isIntersecting);
});
observer.observe(buttonContainerRef.current);
return () => {
observer.disconnect();
};
- }, [buttonContainerRef]);
+ }, [buttonContainerRef, args]);
const handleClick = () => {
setIsOpen(!isOpen);
};