@bitrise/bitkit 10.15.0-alpha-table-new.1 → 10.16.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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bitrise/bitkit",
3
3
  "description": "Bitrise React component library",
4
- "version": "10.15.0-alpha-table-new.1",
4
+ "version": "10.16.1",
5
5
  "repository": "git@github.com:bitrise-io/bitkit.git",
6
6
  "main": "src/index.ts",
7
7
  "license": "UNLICENSED",
@@ -0,0 +1,24 @@
1
+ import { ComponentStory, ComponentMeta } from '@storybook/react';
2
+ import Image from '../Image/Image';
3
+ import AspectRatio from './AspectRatio';
4
+
5
+ export default {
6
+ title: 'Components/AspectRatio',
7
+ component: AspectRatio,
8
+ } as ComponentMeta<typeof AspectRatio>;
9
+
10
+ const Template: ComponentStory<typeof AspectRatio> = (props) => <AspectRatio {...props} />;
11
+
12
+ export const WithImage = Template.bind({});
13
+ WithImage.args = {
14
+ children: <Image alt="Bitrise office" src="bitrise_office.jpg" />,
15
+ maxWidth: 800,
16
+ ratio: 1920 / 1280,
17
+ };
18
+
19
+ export const WithVideo = Template.bind({});
20
+ WithVideo.args = {
21
+ children: <iframe title="Intro to Bitrise" src="https://www.youtube.com/embed/JrCn9xWQ7IM" allowFullScreen />,
22
+ maxWidth: 800,
23
+ ratio: 16 / 9,
24
+ };
@@ -0,0 +1,14 @@
1
+ import { AspectRatio as ChakraAspectRatio, AspectRatioProps, forwardRef } from '@chakra-ui/react';
2
+
3
+ /**
4
+ * AspectRatio component is used to embed responsive videos and maps, etc.
5
+ *
6
+ * https://chakra-ui.com/docs/components/aspect-ratio/usage
7
+ */
8
+ const AspectRatio = forwardRef<AspectRatioProps, 'div'>((props, ref) => {
9
+ return <ChakraAspectRatio {...props} ref={ref} />;
10
+ });
11
+
12
+ export type { AspectRatioProps };
13
+
14
+ export default AspectRatio;
@@ -51,6 +51,7 @@ const Tabletheme: SystemStyleObject = {
51
51
  paddingY: '12',
52
52
  fontWeight: 'bold',
53
53
  textAlign: 'left',
54
+ whiteSpace: 'nowrap',
54
55
  },
55
56
  sortButton: {
56
57
  display: 'flex',
@@ -29,7 +29,6 @@ const Tr = forwardRef<TableRowProps, 'tr'>((props, ref) => {
29
29
  };
30
30
 
31
31
  if (onClick) {
32
- console.log(css);
33
32
  properties.sx = css.clickableTr;
34
33
  }
35
34
 
@@ -10,7 +10,7 @@ export type Props = {
10
10
  * input.
11
11
  */
12
12
  const InputLabel: React.FunctionComponent<Props> = (props: Props) => {
13
- return <Text {...props} as="label" marginY="4" size="3" color="purple.10" fontWeight="bold" />;
13
+ return <Text as="label" marginY="4" size="3" color="purple.10" fontWeight="bold" {...props} />;
14
14
  };
15
15
 
16
16
  export default InputLabel;
package/src/index.ts CHANGED
@@ -163,6 +163,9 @@ export { default as AccordionItem } from './Components/Accordion/AccordionItem';
163
163
  export type { LightBoxProps } from './Components/LightBox/LightBox';
164
164
  export { default as LightBox } from './Components/LightBox/LightBox';
165
165
 
166
+ export type { AspectRatioProps } from './Components/AspectRatio/AspectRatio';
167
+ export { default as AspectRatio } from './Components/AspectRatio/AspectRatio';
168
+
166
169
  export type { TableProps } from './Components/Table/Table';
167
170
  export { default as Table } from './Components/Table/Table';
168
171