diff --git a/README.md b/README.md
index e697d043..6a2622a2 100644
--- a/README.md
+++ b/README.md
@@ -7,7 +7,7 @@
[![Npm Downloads](https://img.shields.io/npm/dm/react-bulma-components.svg)](https://www.npmjs.com/package/react-bulma-components)
-React components for Bulma framework
+React components for Bulma (v0.7.1) framework
This is a implementation in React of the [Bulma](http://bulma.io/) Framework Component by Jeremy Thomas.
diff --git a/package.json b/package.json
index d95199b6..1f7d4e35 100644
--- a/package.json
+++ b/package.json
@@ -41,7 +41,7 @@
},
"homepage": "https://github.com/couds/react-bulma-components#readme",
"dependencies": {
- "bulma": "0.6.1",
+ "bulma": "0.7.1",
"classnames": "2.2.5"
},
"peerDependencies": {
diff --git a/src/components/columns/columns.story.js b/src/components/columns/columns.story.js
index 172f8d2f..bb72177a 100644
--- a/src/components/columns/columns.story.js
+++ b/src/components/columns/columns.story.js
@@ -33,7 +33,7 @@ storiesOf('Columns', module)
.add('Sizes by name', withInfo('')(() => (
{Object.keys(CONSTANTS.SIZES).map(size => (
-
+
{CONSTANTS.SIZES[size]}
diff --git a/src/components/image/constants.js b/src/components/image/constants.js
new file mode 100644
index 00000000..dad496c7
--- /dev/null
+++ b/src/components/image/constants.js
@@ -0,0 +1,4 @@
+export default {
+ SIZES: [16, 24, 32, 48, 64, 96, 128, 'square', '1by1', '4by3', '3by2', '16by9', '2by1', '5by4', '5by3', '3by1', '4by5', '3by4', '2by3', '3by5', '9by16', '1by2', '1by3'],
+};
+
diff --git a/src/components/image/image.js b/src/components/image/image.js
index 7874e257..5e2939e7 100644
--- a/src/components/image/image.js
+++ b/src/components/image/image.js
@@ -1,6 +1,7 @@
import React, { PureComponent } from 'react';
import PropTypes from 'prop-types';
import classnames from 'classnames';
+import CONSTANTS from './constants';
export default class Image extends PureComponent {
static propTypes = {
@@ -8,7 +9,7 @@ export default class Image extends PureComponent {
src: PropTypes.string,
alt: PropTypes.string,
style: PropTypes.shape({}),
- size: PropTypes.oneOf([16, 24, 32, 48, 64, 96, 128, 'square', '1by1', '4by3', '3by2', '16by9', '2by1', '5by4', '5by3', '3by1', '4by5', '3by4', '2by3', '3by5', '9by16', '1by2', '1by3']),
+ size: PropTypes.oneOf(CONSTANTS.SIZES),
fallback: PropTypes.string,
}
diff --git a/src/components/image/image.story.js b/src/components/image/image.story.js
index e6945469..35b185b4 100644
--- a/src/components/image/image.story.js
+++ b/src/components/image/image.story.js
@@ -4,7 +4,8 @@ import { storiesOf } from '@storybook/react';
import { withInfo } from '@storybook/addon-info';
import Image from '.';
-import Content from '../content';
+import CONSTANTS from './constants';
+import Table from '../table';
storiesOf('Image', module)
.addDecorator(story => (
@@ -18,82 +19,54 @@ storiesOf('Image', module)
)))
.add('Fixed Square', withInfo()(() => (
-
-
-
-
- Size |
- Image |
-
-
-
-
- 16 |
- |
-
-
- 24 |
- |
-
-
- 32 |
- |
-
-
- 48 |
- |
-
-
- 64 |
- |
-
-
- 96 |
- |
-
-
- 128 |
- |
-
-
-
-
+
+
+
+ |
+ Size |
+ Image |
+ |
+
+
+
+ {
+ CONSTANTS.SIZES.filter(size => typeof size === 'number').map(size => (
+
+ |
+ {size} |
+
+
+ |
+ |
+
+ ))
+ }
+
+
)))
.add('Responsive images with ratios', withInfo()(() => (
-
-
-
-
- Ratio |
- Image |
-
-
-
-
- square |
- |
-
-
- 1by1 |
- |
-
-
- 4by3 |
- |
-
-
- 3by2 |
- |
-
-
- 16by9 |
- |
-
-
- 2by1 |
- |
-
-
-
-
+
+
+
+ |
+ Size |
+ Image |
+ |
+
+
+
+ {
+ CONSTANTS.SIZES.filter(size => typeof size === 'string').map(size => (
+
+ |
+ {size} |
+
+
+ |
+ |
+
+ ))
+ }
+
+
)));
diff --git a/yarn.lock b/yarn.lock
index 44252018..94dc8084 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -2181,9 +2181,9 @@ builtin-status-codes@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz#85982878e21b98e1c66425e03d0174788f569ee8"
-bulma@0.6.1:
- version "0.6.1"
- resolved "https://registry.yarnpkg.com/bulma/-/bulma-0.6.1.tgz#5f21a77c0c06f7d80051c06628c23516081bd649"
+bulma@0.7.1:
+ version "0.7.1"
+ resolved "https://registry.yarnpkg.com/bulma/-/bulma-0.7.1.tgz#73c2e3b2930c90cc272029cbd19918b493fca486"
bytes@3.0.0:
version "3.0.0"