diff --git a/CHANGELOG.md b/CHANGELOG.md
index f67ff4a..32c94a3 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,11 @@
# 🗓 Changelog
+## 1.2.0
+
+`2020-01-06`
+
+- remove height. [#2](https://github.com/image-component/react-image-follow/pull/2)
+
## 1.1.0
`2021-01-06`
diff --git a/assets/index.less b/assets/index.less
index 4cca9bd..dd4cac1 100644
--- a/assets/index.less
+++ b/assets/index.less
@@ -1,5 +1,6 @@
.react-image-follow {
width: 100%;
+ height: 400px;
position: relative;
display: flex;
align-items: center;
diff --git a/docs/example/base.tsx b/docs/example/base.tsx
index 7289a36..2e5c1bb 100644
--- a/docs/example/base.tsx
+++ b/docs/example/base.tsx
@@ -13,7 +13,7 @@ const src =
const App = () => {
return (
-
+
);
};
diff --git a/docs/example/extra.tsx b/docs/example/extra.tsx
index 2403e9a..9d18c81 100644
--- a/docs/example/extra.tsx
+++ b/docs/example/extra.tsx
@@ -13,7 +13,7 @@ const src =
const App = () => {
return (
-
+
Image Follow
diff --git a/docs/example/link.tsx b/docs/example/link.tsx
index c2af816..10240fc 100644
--- a/docs/example/link.tsx
+++ b/docs/example/link.tsx
@@ -16,7 +16,6 @@ const App = () => {
Can Click
diff --git a/src/template.tsx b/src/template.tsx
index ddea9cc..43534b3 100644
--- a/src/template.tsx
+++ b/src/template.tsx
@@ -7,7 +7,6 @@ type ImageFollowProps = {
radius?: number;
src: string;
style?: React.CSSProperties;
- height?: number;
href?: string;
children?: React.ReactNode;
};
@@ -15,16 +14,7 @@ type ImageFollowProps = {
export { ImageFollowProps };
const ImageFollow = (props: ImageFollowProps) => {
- const {
- alt,
- className,
- radius = 8,
- src,
- style,
- height = 200,
- href,
- children,
- } = props;
+ const { alt, className, radius = 8, src, style, href, children } = props;
const [cardStyle, setCardStyle] = React.useState({});
const [wrapperStyle, setWrapperStyle] = React.useState({});
@@ -33,7 +23,6 @@ const ImageFollow = (props: ImageFollowProps) => {
const cardRef = React.useRef();
const cardBaseStyle = {
- height: `${height}px`,
borderRadius: `${radius}px`,
...style,
};
diff --git a/tests/__snapshots__/index.spec.tsx.snap b/tests/__snapshots__/index.spec.tsx.snap
index 656b85c..d19e2c9 100644
--- a/tests/__snapshots__/index.spec.tsx.snap
+++ b/tests/__snapshots__/index.spec.tsx.snap
@@ -9,7 +9,6 @@ exports[`temp render 1`] = `
style={
Object {
"borderRadius": "8px",
- "height": "200px",
}
}
target="_blank"