@bitrise/bitkit 9.39.1 → 9.40.0-alpha-chakra.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ComponentStory, ComponentMeta } from '@storybook/react';
|
|
2
|
+
import Image from './Image';
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
title: 'Components/Image',
|
|
6
|
+
component: Image,
|
|
7
|
+
} as ComponentMeta<typeof Image>;
|
|
8
|
+
|
|
9
|
+
const Template: ComponentStory<typeof Image> = (props) => <Image {...props} />;
|
|
10
|
+
|
|
11
|
+
export const WithProps = Template.bind({});
|
|
12
|
+
WithProps.args = {
|
|
13
|
+
alt: 'Bitrise office',
|
|
14
|
+
src: 'bitrise_office.jpg',
|
|
15
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Image as ChakraImage, ImageProps, forwardRef } from '@chakra-ui/react';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* The Image component is used to display images with support for fallback. (Default callback not implemented yet)
|
|
5
|
+
*/
|
|
6
|
+
const Image = forwardRef<ImageProps, 'img'>((props, ref) => {
|
|
7
|
+
return <ChakraImage {...props} ref={ref} />;
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
export type { ImageProps };
|
|
11
|
+
|
|
12
|
+
export default Image;
|